Global maximum pooling?

I’m using this as last layer = nn.Sequential(

I had the feeling that there was something wrong at the output, so I checked manually the maximum value it is the same but when applying the sigmoid the results are different.

the input is of size

Could you post a small script creating this issue?
As far as I understand, the maximal value changes when sigmoid is applied?

Maybe you need to assign one more parameter that stride=1 in MaxPool2d?