Any update on assigning gradients to parameters without calling backward()? I have a similar situation where I compute the gradients manually. I added the gradient as

param.grad = Variable(my_gradient_tensor)

But on optimizer.step() does not update the parameters.