Solved by albanD in post #4 
              
              
                I’m afraid that in the general case no, there isn’t any other way to get that  
As a fun fact, some optimizers like lbfgs might actually do the step as multiple “sub-steps”, so in that case, checking before and after is really the only thing you can do.