loss.backward报错
报错信息:RuntimeError: Legacy autograd function with non-static forward method is deprecated. Please use new-style autograd function with static forward method.
错误原因:loss.backward()回传失败,inplace设置为了True,原来的参数被覆盖了
解决方法:将inplace设置为False
错误原因:loss.backward()回传失败,inplace设置为了True,原来的参数被覆盖了
解决方法:将inplace设置为False