Questions about global average pooling

I use fully connected layer,

    self.out1 = nn.Sequential(
        nn.AvgPool2d(4) # where 4 is kernel size

    )





    x = self.conv4(x)
    x = self.out1(x)
    x = x.view(-1, 1024*1*1)