Rate this Page

Class AvgPool2dImpl#

Inheritance Relationships#

Base Type#

Class Documentation#

class AvgPool2dImpl : public torch::nn::AvgPoolImpl<2, AvgPool2dImpl>#

Applies avgpool over a 2-D input.

See https://pytorch.org/docs/main/nn.html#torch.nn.AvgPool2d to learn about the exact behavior of this module.

See the documentation for torch::nn::AvgPool2dOptions class to learn what constructor arguments are supported for this module.

Example:

AvgPool2d model(AvgPool2dOptions({3, 2}).stride({2, 2}));

Public Functions

Tensor forward(const Tensor &input)#