Class AvgPoolFusion
Defined in File avg_pool_fusion.h
Inheritance Relationships
Base Type
public mindspore::ops::BaseOperator
Class Documentation
-
class AvgPoolFusion : public mindspore::ops::BaseOperator
AvgPoolFusion defined AvgPool operator prototype of lite.
Public Functions
-
inline AvgPoolFusion()
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 = 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_pad_mode(const int64_t &pad_mode)
Set pad_mode.
-
void set_kernel_size(const std::vector<int64_t> &kernel_size)
Set kernel_size.
-
void set_strides(const std::vector<int64_t> &strides)
Set strides.
-
void set_data_format(const int64_t &data_format)
Set format.
-
void set_pad(const std::vector<int64_t> &pad)
Set pad.
-
void set_round_mode(const int64_t &round_mode)
Set round_mode.
-
std::vector<int64_t> get_kernel_size() const
Get kernel_size.
- 返回
kernel_size.
-
std::vector<int64_t> get_strides() const
Get strides.
- 返回
strides.
-
int64_t get_pad_mode() const
Get pad_mode.
- 返回
pad_mode.
-
int64_t get_data_format() const
Get format.
- 返回
format.
-
std::vector<int64_t> get_pad() const
Get pad.
- 返回
pad.
-
int64_t get_round_mode() const
Get round_mode.
- 返回
round_mode.
-
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.
-
inline AvgPoolFusion()