hamedB:

Sorry, the inputs and outputs that you mentioned means input activations to this module and the output activations of this module?


No, the gradient inputs and outputs created during the backward pass. The figures in this post 7 give you a better idea of the forward activations and the gradients during the backward pass.



 hamedB:

And the parameter that you also mentioned means weights and bias of this module? Am I right? Because, based on the code snippet provided by @albanD in this discussion How do hooks work? , the register_hook function is registered on the output activations of the module.


Yes, I meant the parameters of the module such as weight and bias, but register_hook can be used generally on tensors, not only parameters.