why is the following:
w.data = w.data - eta*w.grad.data

or
w= w- eta*w.grad

is not recommended?
I actually got from the official tutorials:
http://pytorch.org/tutorials/beginner/pytorch_with_examples.html#pytorch-nn 601
for param in model.parameters():
    param.data -= learning_rate * param.grad.data
and

Or
w1.data -= learning_rate * w1.grad.data
w2.data -= learning_rate * w2.grad.data