note that I am re-asigning .data because the tutorials do it:
http://pytorch.org/tutorials/beginner/pytorch_with_examples.html#pytorch-nn 179
for param in model.parameters():
    param.data -= learning_rate * param.grad.data

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


Also, why should we not be re-assigning .data?