SENet-PyTorch icon indicating copy to clipboard operation
SENet-PyTorch copied to clipboard

The global average pooling function is not implemented in the code.

Open haomingHu-dd opened this issue 1 year ago • 0 comments

In the code, the global average pooling in the SE structure is implemented through average pooling, but the output size is not like 1X1XC in the paper. Is there a problem with the code? I try to use A to implement it. Is it feasible?

in your code: if planes == 64: self.globalAvgPool = nn.AvgPool2d(56, stride=1) elif planes == 128: self.globalAvgPool = nn.AvgPool2d(28, stride=1) elif planes == 256: self.globalAvgPool = nn.AvgPool2d(14, stride=1) elif planes == 512: self.globalAvgPool = nn.AvgPool2d(7, stride=1)

my code: self.avgpool = nn.AdaptiveMaxPool2d((1, 1))

haomingHu-dd avatar Dec 14 '23 09:12 haomingHu-dd