helios.nn.layers.pool¶
Classes¶
Applies a 2D adaptive average pooling over an input signal composed of several input planes. |
Module Contents¶
- class helios.nn.layers.pool.AdaptiveAvgPool2d(output_size: int | tuple[int | None, int | None])[source]¶
Bases:
torch.nn.ModuleApplies a 2D adaptive average pooling over an input signal composed of several input planes.
The output is of size \(H \times W\), for any input size. The number of output features is equal to the number of input planes.
Note
This class is a re-implementation of
torch.nn.AdaptiveAvgPool2dthat can be exported to ONNX and serves as a drop-in replacement for torch’s version.- Parameters:
output_size – the target output size of the image of the form \(H \times W\). Can be a tuple
(H, W)or a singleHfor a square image \(H \times H\).HandWcan be either aint, orNonewhich means the size will be the same as that of the input.