Hi,
i am using Cuda11.1 and encountered following error.
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)
def make_nograd_func(func):
def wrapper(*f_args, *f_kwargs):
with torch.no_grad():
ret = func(f_args, **f_kwargs)
return ret
return wrapper
This is the function that throws the error while calling func()
Hi, i am using Cuda11.1 and encountered following error. 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)
def make_nograd_func(func): def wrapper(*f_args, *f_kwargs): with torch.no_grad(): ret = func(f_args, **f_kwargs) return ret return wrapper
This is the function that throws the error while calling func()