ref
https://pytorch.org/docs/stable/nn.html#torch-nn-functional
torch.nn.functional.avg_pool2d(input, kernel_size, stride=None, padding=0, ceil_mode=False, count_include_pad=True) → Tensor
只需要输出张量,
卷积核,可以一个数可以不是方形的。
尺寸
inputx= torch.randn(2, 3, 4, 4)
F.avg_pool2d(inputx,2,1)