Thanks for your answers.
This is not so easy, because that tensor is a Parameter, which means I cannot just change its values, apparently.
Furthermore, I would like this behaviour of that member from my module to be “built-in”: I don’t want a user having to manually sort it each time he-she calls an optimizer step !
is there some more way to track that a class member for a module has been changed ?