Class MaxPoolFusion

Inheritance Relationships

Base Type

Class Documentation

class MaxPoolFusion : public mindspore::ops::MaxPool

MaxPoolFusion defined MaxPool operator prototype of lite.

Public Functions

inline MaxPoolFusion()

Constructor.

void Init(const std::vector<int64_t> &kernel_size = {1}, const std::vector<int64_t> &stride = {1}, const PadMode &pad_mode = VALID, const Format &format = NCHW, const std::vector<int64_t> &pad = {0, 0, 0, 0}, const RoundMode &round_mode = RoundMode::FLOOR, const bool global = false, const ActivationType activation_type = NO_ACTIVATION)

Method to init the op's attributes.

参数
  • kernel_size[in] Define the size of the kernel.

  • stride[in] Define the moving size of the kernel.

  • pad_mode[in] Define the padding method.

  • format[in] Define the format of input tensor.

  • pad[in] Define the concrete padding value on each dimension

  • round_mode[in] Define numerical operation mode of the output tensor.

  • global[in] Define a boolean value to indicate whether to do global pooling. If true, kernel_size will be useless.

  • activation_type[in] Define the activation type.

void set_global(const bool global)

Method to set global attribute.

参数

global[in] Define a boolean value to indicate whether to do global pooling. If true, kernel_size will be useless.

void set_activation_type(const ActivationType activation_type)

Method to set activation type.

参数

activation_type[in] Define the activation type.

bool get_global() const

Method to get global attribute.

返回

a boolean value to indicate whether to do global pooling. If true, kernel_size will be useless.

ActivationType get_activation_type() const

Method to get activation type.

返回

activation type.