当我用pytorch1.7版本的gpu来跑这个程序的时候,老报下面的错误,请问怎么解决?
File "/data/miniconda3/lib/python3.7/site-packages/torch/autograd/function.py", line 160, in call
45 | | "Legacy autograd function with non-static forward method is deprecated. "
46 | | RuntimeError: Legacy autograd function with non-static forward method is deprecated. Please use new-style autograd function with static forward method. (Example: https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function)
当我用pytorch1.7版本的gpu来跑这个程序的时候,老报下面的错误,请问怎么解决? File "/data/miniconda3/lib/python3.7/site-packages/torch/autograd/function.py", line 160, in call
45 | | "Legacy autograd function with non-static forward method is deprecated. " 46 | | RuntimeError: Legacy autograd function with non-static forward method is deprecated. Please use new-style autograd function with static forward method. (Example: https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function)