我收到警告说
/tmp/pip-req-build-58y_cjjl/torch/csrc/autograd/python_function.cpp:638: UserWarning: Legacy autograd function with non-static forward method is deprecated and will be removed in 1.3.
Please use new-style autograd function with static forward method. (Example: https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function)
/tmp/pip-req-build-58y_cjjl/torch/csrc/autograd/python_function.cpp:664: UserWarning: Legacy autograd function object was called twice. You will probably get incorrect gradients from
this computation, as the saved tensors from the second invocation will clobber the saved tensors from the first invocation. Please consider rewriting your autograd function in the m
odern style; for information on the new format, please see: https://pytorch.org/docs/stable/notes/extending.html#extending-torch-autograd
这意味着我必须在Pythorch 1.3或更高版本中定义静态转发函数。
我只是想知道为什么自动加载功能一定是静态的?在
目前没有回答
相关问题 更多 >
编程相关推荐