Much cleaner with function, because I can’t find tutorials or examples of hook use.
So I need to apply the function on the output tensor and all previous calculations will be with reversed gradients, right?
Also, while googling function, I found this example
-x + (x*2).detach()