The tensor.backward() operation can be called without passing an explicit gradient to it as an argument if the tensor is a scalar tensor. If the tensor has more than a single element you would have to pass the gradient to backward. You could use loss = x.sum() to calculate the gradient in fc if you would like to use x.sum() as the loss.