Hi, the doc you pointed to has a minor problem: the second argument, grad_variables, should be “sequence of tensors”, not “sequence of Variables”.
See your code here:

  
      github.com
  
  
    pytorch/pytorch/blob/master/test/test_autograd.py#L144-L146 158



def test_legacy_function_none_grad(self):
    class MyFunction(Function):