ok!
not sure why is X not a leaf tensor when i :

initiated it myself  is not a product of some computation
i set requires_grad to true.

furthermore, perhaps you can shed light about the data attribute. i can’t figure out when to use it when updating a tensor.