pytorch-inference
pytorch::MaxPool2d Class Reference

#include <Pooling.hpp>

Inheritance diagram for pytorch::MaxPool2d:
pytorch::Layer

Public Member Functions

 MaxPool2d (const pooling_params_t &params)
 Constructs the MaxPool2d layer. Requires pooling parameters that are functionally equivalent to the convolutional parameters. More...
 
tensor get_indices () const
 
std::vector< tensor > forward (const std::vector< tensor > &input)
 Implements the forward pass. More...
 
std::vector< tensor > operator() (const std::vector< tensor > &input)
 Implements the forward pass. More...
 

Private Attributes

pooling_params_t params
 
tensor indices
 

Constructor & Destructor Documentation

◆ MaxPool2d()

pytorch::MaxPool2d::MaxPool2d ( const pooling_params_t &  params)
inline

Constructs the MaxPool2d layer. Requires pooling parameters that are functionally equivalent to the convolutional parameters.

Parameters
paramsPooling parameters like window, stride, etc.

Member Function Documentation

◆ forward()

std::vector<tensor> pytorch::MaxPool2d::forward ( const std::vector< tensor > &  input)
inlinevirtual

Implements the forward pass.

Parameters
inputThe input array to be pooled
Returns
The pooled array

Implements pytorch::Layer.

◆ get_indices()

tensor pytorch::MaxPool2d::get_indices ( ) const
inline

◆ operator()()

std::vector<tensor> pytorch::MaxPool2d::operator() ( const std::vector< tensor > &  input)
inlinevirtual

Implements the forward pass.

Parameters
inputThe input array to be pooled
Returns
The pooled array

Implements pytorch::Layer.

Member Data Documentation

◆ indices

tensor pytorch::MaxPool2d::indices
private

◆ params

pooling_params_t pytorch::MaxPool2d::params
private

The documentation for this class was generated from the following file: