AdaptiveAvgPool1d(output_size: Union[int, Tuple[int]])¶
Applies a 1D adaptive average pooling over an input signal composed of several input planes.
The output size is H, for any input size. The number of output features is equal to the number of input planes.
output_size – the target output size H
>>> import numpy as np >>> import oneflow as flow >>> import oneflow.nn as nn >>> m = nn.AdaptiveAvgPool1d(5) >>> input = flow.Tensor(np.random.randn(1, 64, 8)) >>> output = m(input) >>> output.size() oneflow.Size([1, 64, 5])