Solved by albanD in post #2 
              
              
                Hi, 
I am afraid this is not really possible. This would compute the “wrong” gradients and so autograd will raise an error if you try to change the input inplace before computing the backward. 
For the particular case of AdaptiveAveragePool, the input value is not actually needed when you compute th…