Hi,
__isub__ is an inplace operation and so W remains the same object (and so it’s .grad field remains)
If you do W = ... then you create a new object and assign it to W. This new object does not have a .grad field.