Solved by ptrblck in post #3 
              
              
                How would you like to sum the conv layer outputs? 
If you would like to sum over a specific dimension, you could simply use: 
output = conv(input)
output = output.sum(dim=1)  # change the dim to your use case

On the other hand, if you would like to sum patches similar to a conv layer, you could def…