It does only check what happens during backward. But I don’t know what your functions are doing so I just mentioned it 

It is more complex than that. Changing anything in the code will change the behavior. And the anomaly mode that adds a lot of checks might be changing the ordering of some ops (that that it will always, but it is a possibility).
The way I would debug that is split all of these into different lines to see which one is the actual faulty one. Then you can print the input/outputs and see if anything looks off. For normalization, you can get into issues when all values converge to the same thing and thus the variance becomes 0 for example.


Is there any conflict between hooks and anomaly detection?

No there shouldn’t be. But again, since these introduce more ops, you might end up with a slightly different execution that does not exhibit the issue.