Flatten before Sigmoid()?

I want to build classification model with global average pooling.
Should I flatten before using Sigmoid() ?

        self.main = nn.Sequential(
            nn.Conv2d(in_channels=out_channel, out_channels=1, kernel_size=1),
            nn.AvgPool2d(28, 1)
            # flatten -> sigmoid
            # sigmoid

Flatten is an elemebt-wise operation so it doesn’t really matter if you just apply spatial transformations afterwards

As Juan mentioned, you don’t need to flatten before sigmoid. You do need to flatten it so it will fit in the last fully connected layer since you are doing classification