I am having a trouble with understanding the workings of .backward() and .grad() in PyTorch. Particularly, w.grad seems to become None type in the following code. Could you help to clarify what’s going on here. I am using PyTorch version 1.0.0. Thanks.

Screenshot 2019-02-23 at 23.06.17.png1140×623 68.1 KB