Hi,
Unfortunately the Module backward hooks have been broken forever for such “complex” model.
If you’re using a recent version of pytorch, you can use the “full” versions Module — PyTorch 1.9.0 documentation 5 that will have the expected behavior.