Hi,
You should never use .data as it is deprecated now.
I don’t think there is any mechanism to know when a Tensor is modified I’m afraid.  The Optimizer does not even reference the Module, just the Tensors.
What would be your particular use case here?