global average pooling in PyTorch: torch.nn.AvgPool1d vs torch.mean

To implement global average pooling in a PyTorch neural network model, which one is better and why: to use torch.nn.AvgPool1d() and set the kernel_size to the input dimension or to use torch.mean()?

Topic pooling pytorch neural-network

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.