Solved by albanD in post #2 
              
              
                The hook will give you the gradient at the point where the hook is registered. 
If you want to get it after every computation, you need to register one after every computation.