Solved by Oli in post #2 
              
              
                Hello  
You can make your own class that implements the pooling of your choice. It needs to inherit from the pytorch Module class. Here is an example 
class GeneralizedMeanPooling(Module):
    """Applies a 2D power-average adaptive pooling over an input signal composed of several input planes.
    T…