Hello,
l h would like to replace my fully connected layer with global average pooling layer.
l have 10 classes and my last convolutional layer output  a 3D tensor of 16,25,32.

Last_conv=tensor.view(16,25,32)
# something to do here !!
final_layer=self.global_average_pooling(last_conv) #
output=self.Softmax(final_layer)

My question is how to pass from 3d tensor of 16,25,32 to  10 (number of classes) through global average pooling ?
Thank you