一文理解PyTorch:附代码实例 - 知乎
zhuanlan.zhihu.com › p › 111144134# FIRST ATTEMPT # AttributeError: 'NoneType' object has no attribute 'zero_' # a = a - lr * a.grad # b = b - lr * b.grad # print(a) # SECOND ATTEMPT # RuntimeError: a leaf Variable that requires grad has been used in an in-place operation.