AdaptiveMaxPool1d#
- class torch.nn.AdaptiveMaxPool1d(output_size, return_indices=False)[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.AdaptiveMaxPool1d(5) >>> input = torch.randn(1, 64, 8) >>> output = m(input)