Rate this Page

Class AdaptiveMaxPool1dImpl#

Inheritance Relationships#

Base Type#

Class Documentation#

class AdaptiveMaxPool1dImpl : public torch::nn::AdaptiveMaxPoolImpl<1, ExpandingArray<1>, AdaptiveMaxPool1dImpl>#

Applies adaptive maxpool over a 1-D input.

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

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

Example:

AdaptiveMaxPool1d model(AdaptiveMaxPool1dOptions(3));

Public Functions

Tensor forward(const Tensor &input)#
std::tuple<Tensor, Tensor> forward_with_indices(const Tensor &input)#

Returns the indices along with the outputs.

Useful to pass to nn.MaxUnpool1d.