Thank you for your response.
This hook_fn is equivalent to the backward hook on modules that gives the gradients. If I want to get the forward hooks what would be the correct way of defining hook_fn?
Thanks,