class nbla::BasePooling

template<typename T, class ...Args>
class BasePooling : public nbla::BaseFunction<Args...>

Base class for pooling functions AveragePooling, SumPooling and MaxPooling.

Inputs:

  • N-D array that has more than two dimensions.

Outputs:

  • N-D array.

Note

Only 2D pooling supported so far.

Template Parameters:

T – Data type for computation.

Param kernel:

Shapes of kernel.

Param stride:

Subsampling factors of pooling.

Param ignore_border:

If false, a kernel overlapping border is also considered for output unlike convolution.

Param pad:

Border padding values of dimensions. Padding will be added both sides of the dimension.

Public Functions

inline virtual shared_ptr<Function> copy() const

Copy another instance of Function with the same context.

inline virtual vector<dtypes> in_types()

Get input dtypes.

Last in_type will be used repeatedly if size of in_types is smaller than size of inputs

inline virtual vector<dtypes> out_types()

Get output dtypes.

Last out_type will be used repeatedly if size of out_types is smaller than size of outputs

inline virtual int min_inputs()

Get minimum number of inputs.

This is meant to be used in setup function with in_types which is used to get maximum number of inputs.

inline virtual int min_outputs()

Get minimum number of outputs.

This is meant to be used in setup function with out_types which is used to get max number of outputs.

inline virtual string name()

Get function name in string.

inline virtual vector<string> allowed_array_classes()

Get array classes that are allowed to be specified by Context.