Class ReduceFusion

Inheritance Relationships

Base Type

Class Documentation

class ReduceFusion : public mindspore::ops::Reduce

ReduceFusion defined Reduce operator prototype of lite.

Public Functions

inline ReduceFusion()

Constructor.

void Init(const bool keep_dims = false, const ReduceMode mode = ReduceMode::Reduce_Mean, const bool reduce_to_end = false, const float coeff = 1.0)

Method to init the op’s attributes.

参数
  • keep_dims[in] Define a boolean value to indicate whether output dimension is kept or not.

  • mode[in] Define the concrete reduction mode.

  • reduce_to_end[in] Define a boolean value to indicate whether the operation need to do from the given axis to the last.

  • coeff[in] Define a size factor applied to output.

void set_keep_dims(const bool keep_dims)

Method to set keep_dims attribute.

参数

keep_dims[in] Define a boolean value to indicate whether output dimension is kept or not.

void set_mode(const ReduceMode mode)

Method to set mode attribute.

参数

mode[in] Define the concrete reduction mode.

void set_reduce_to_end(const bool reduce_to_end)

Method to set reduce_to_end attribute.

参数

reduce_to_end[in] Define a boolean value to indicate whether the operation need to do from the given axis to the last.

void set_coeff(const float coeff)

Method to set coeff attribute.

参数

coeff[in] Define a size factor applied to output.

bool get_keep_dims() const

Method to get keep_dims attribute.

返回

a boolean value.

ReduceMode get_mode() const

Method to get mode attribute.

返回

reduction mode.

bool get_reduce_to_end() const

Method to get reduce_to_end attribute.

返回

a boolean value.

float get_coeff() const

Method to get coeff attribute.

返回

a size factor applied to output.