Brando_Miranda:

delta = eta*W.grad.data
W.data.copy_(W.data - delta)


The reason why this isn’t included in the next iteration is that you’re performing operations on W.grad.data, which is a Tensor. Operations that directly modify Variables are recorded in the computation graph, but operation acting on the data wrapped by Variables aren’t.  Does that answer your question?