c_dai:

the tensor size is torch.Size([14, 14, 2048])


Furthermore, if you start from a tensor of size [14, 14, 2048], you need to add an extra dimension by calling .unsqueeze()  as follows:
>>> a =torch.randn(14, 14, 2048)
>>> a.shape
torch.Size([14, 14, 2048])
>>> a = a.unsqueeze(dim=0)
>>> a.shape
torch.Size([1, 14, 14, 2048])

This will assume that we have a batch of size 1 (first dimension). Now you can permute the axes of this tensor and then pass the final tensor through avg_pool2d:
>>> a = a.permute(0, 3, 1, 2)
>>> a.shape
torch.Size([1, 2048, 14, 14])
>>> b = F.avg_pool2d(a, kernel_size=14)
>>> b.shape
torch.Size([1, 2048, 1, 1])
>>> b = b.squeeze()
>>> b.shape
torch.Size([2048])