Hi all,
Is there a better way to register a hook on an internal variable instead of actually register the hook at each forward step ?
The context is the following:
At each forward step, i want to keep the gradient of some internal variables in a buffer so I use hooks. The problem is I want to apply the register hook once and not each time that I use the internal variables.
Is there a simple way to achieve that ?
Thanks for your time,
The problem appears: https://github.com/makdoudN/Bayes-By-Backprop/blob/master/net.py (L40-43)