m1 = nn.AdaptiveAvgPool2d((None,5)) m2 = nn.AdaptiveAvgPool2d(1)input= torch.randn(2,64,8,9) output =m(input) output1 =m1(input) output2 =m2(input)print('nn.AdaptiveAvgPool2d((5,1)):',output.shape)print('nn.AdaptiveAvgPool2d((None,5)):',output1.shape)print('nn.AdaptiveA...
1.函数语法格式和作用作用: 自适应平均池化,指定输出(H,W) 函数语言格式:nn.AdaptiveAvgPool2d(output_size) 2.参数解释output_size:指定输出固定尺寸3.具体代码
具体如下: AdaptiveAvgPool2d CLASStorch.nn.AdaptiveAvgPool2d(output_size)[SOURCE] Applies a 2D adaptive average pooling over an input signal composed of several input planes. The output is of size H x W, for any input size. The number of output features is equal to the number of input p...
具体如下: AdaptiveAvgPool2d CLASStorch.nn.AdaptiveAvgPool2d(output_size)[SOURCE] Applies a 2D adaptive average pooling over an input signal composed of several input planes. The output is of size H x W, for any input size. The number of output features is equal to the nu...
具体如下: AdaptiveAvgPool2d CLASStorch.nn.AdaptiveAvgPool2d(output_size)[SOURCE] Applies a 2D adaptive average pooling over an input signal composed of several input planes. The output is of size H x W, for any input size. The number of output features is equal to the nu...
CLASStorch.nn.AdaptiveAvgPool2d(output_size)[SOURCE] Applies a 2D adaptive average pooling over an input signal composed of several input planes. The output is of size H x W, for any input size. The number of output features is equal to the number of input planes. ...