Hi,
In you backward cpp method, you do int n_channels = grad.size(0); while to be consistent with the rest of your code it should be int n_channels = grad.size(1); no? Or do you expect some transpose somewhere?