It’s a simple module already.  The one from my second comment is just two layers of a module that contains a single conv2d, applies, it then applies a sigmoid.  If you call a backward hook on that grad_in is correctly, inverse sigmoid * grad_out.  If instead you add a constant after applying the sigmoid, grad_out and grad_in are the same in the backward hook for the module.  However, it seems that the inverse does get applied before going to the input layer and grad_in just isnt displayed properly in the backward hook which seems to only go one step into the modules multistep gradient calculation.  If you’re a dev, I’d be happy to try to help get to the bottom of this.  But otherwise, thank you for the reply!  The actual grad is correct so I don’t have any issue with grad_in not being right in the backward hook function.