Hi,
why does
W = W - learning_rate * W.grad
W.grad.zero_()

gives me:

AttributeError: ‘NoneType’ object has no attribute ‘zero_’

after one step, while
W -= learning_rate * W.grad
W.grad.zero_()

works as expected?