I have data with the shape: (512, 20, 32) and I want to use AvgPool
and get the shape of: (512, 10, 32).
I have tried with no success:
pool = nn.AvgPool1d(kernel_size=2, stride=2)
data = torch.rand(512, 20, 32)
out = pool(data)
print(out.shape)
output:
torch.size([512, 20, 16])
How can I run pool on the horizontal data ?