How to use autograd with normalized gradient?


#1

Do I have to write the backward pass myself? Or is there a workaround that allows me to use autograd but with the gradient normalized?


#2

Have a look at backward hooks. It should work without an own implementation of the backward function.