函数语言格式: nn.AdaptiveAvgPool2d(output_size) 2.参数解释 output_size:指定输出固定尺寸 3.具体代码 import torch import torch.nnas nn m = nn.AdaptiveAvgPool2d((5,1)) m1 = nn.AdaptiveAvgPool2d((None,5)) m2 = nn.AdaptiveAvgPool2d(1)input= torch.randn(2,64,8,9) output =m(input)...
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...
[[ 0.5121, 0.1827], [ 0.0243, -0.2986]]]) >>> 0.6574+1.5219+2.7337-0.1561 4.7569 >>> 4.7569/4 1.189225 >>> 以上这篇pytorch torch.nn.AdaptiveAvgPool2d()自适应平均池化函数详解就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。