You almost surely don’t want to use the module hook 16 but add mysomething.register_hook(...) on the variables.
For example I use (from the top of my head) mysomething.register_hook(lambda x: x.clamp(min=-10, max=10)) for recreating Graves’ handwriting RNN 5.
Best regards
Thomas