I created a simple Linear Regression using PyTorch (version 1.11)
My question is :
is not the statement “w -= lr * w.grad” same as “w = w - lr * w.grad”
Then why in one case my program passes, in the other case, it fails.
It fails when my code has:
w = w - lr * w.grad
But it works fine when I change the line as::
w -= lr * w.grad
In : torch.version
I already filed a bug which is closed now. Bug number #74158
I think this is a valid bug, though a minor one.
Please comment. Thank you for your help.