Shortcuts

Class MaxPool1dImpl

Inheritance Relationships

Base Type

Class Documentation

class torch::nn::MaxPool1dImpl : public torch::nn::MaxPoolImpl<1, MaxPool1dImpl>

Applies maxpool over a 1-D input.

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

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

Example:

MaxPool1d model(MaxPool1dOptions(3).stride(2));

Public Functions

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

Returns the outputs and the indices of the max values.

Useful for torch::nn::MaxUnpool1d later.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources