I found this quite helpful for understanding the Autograd refactor and how the new function defs work: https://github.com/pytorch/pytorch/pull/1016 29
However, for max-pooling I am still quite confused as it seems like the logic is implemented in the THNN backend…I cannot actually find the source code for this.
Should the pooling function be moved out of THNN in order to implement the higher order derivatives? Or is there a simple way to use the existing functions?