On this page
AdaptiveMaxPool1d
class torch.nn.AdaptiveMaxPool1d(output_size, return_indices=False)
[source]-
Applies a 1D adaptive max pooling over an input signal composed of several input planes.
The output size is , for any input size. The number of output features is equal to the number of input planes.
- Parameters
- Shape:
-
- Input: or .
- Output: or , where .
Examples
>>> # target output size of 5 >>> m = nn.AdaptiveMaxPool1d(5) >>> input = torch.randn(1, 64, 8) >>> output = m(input)
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.nn.AdaptiveMaxPool1d.html