Hi,
I would guess that this most likely happens because of interactions between views and inplace operations.
In general I would discourage using module backward hook. You can see in the doc a warning that their current behavior is not always as expected.
In your case, it would be more reliable to use t.register_hook() directly on the Tensors of interest. Note that you can do this inside your forward hook.