pytorch-inference
pytorch::AvgPool2d Class Reference

#include <Pooling.hpp>

Inheritance diagram for pytorch::AvgPool2d:
pytorch::Layer

Public Member Functions

 AvgPool2d (const pooling_params_t &params)
 Constructs the AvgPool2d layer. Requires pooling parameters that are functionally identical to the convolution parameters. More...
 
std::vector< tensor > forward (const std::vector< tensor > &input)
 Implements the forwards pass. More...
 
std::vector< tensor > operator() (const std::vector< tensor > &input)
 Implements the forwards pass. More...
 

Private Attributes

pooling_params_t params
 

Constructor & Destructor Documentation

◆ AvgPool2d()

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

Constructs the AvgPool2d layer. Requires pooling parameters that are functionally identical to the convolution parameters.

Parameters
paramsPooling parameters

Member Function Documentation

◆ forward()

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

Implements the forwards pass.

Parameters
inputThe input array to be pooled
Returns
The pooled array

Implements pytorch::Layer.

◆ operator()()

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

Implements the forwards pass.

Parameters
inputThe input array to be pooled
Returns
The pooled array

Implements pytorch::Layer.

Member Data Documentation

◆ params

pooling_params_t pytorch::AvgPool2d::params
private

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