AdaptiveAvgPool1d#
- class torch.nn.AdaptiveAvgPool1d(output_size)[source]#
对由多个输入平面组成的输入信号应用 1D 自适应平均池化。
The output size is , for any input size. The number of output features is equal to the number of input planes.
- 形状
Input: or .
Output: or , where .
示例
>>> # target output size of 5 >>> m = nn.AdaptiveAvgPool1d(5) >>> input = torch.randn(1, 64, 8) >>> output = m(input)