torch.nn.Module.register_full_backward_hook
Module.register_full_backward_hook(hook: BackwardHook): RemovableHandleRegister a full backward hook on this module. The hook will be called during the backward pass.
Parameters
hookBackwardHook- Function called with (module, gradInput, gradOutput)
Returns
RemovableHandle– Handle to remove the hook