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.

Parameters
  • 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.

Parameters

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.

Parameters

mode[in] Define the concrete reduction mode.

void set_reduce_to_end(const bool reduce_to_end)

Method to set reduce_to_end attribute.

Parameters

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.

Parameters

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

bool get_keep_dims() const

Method to get keep_dims attribute.

Returns

a boolean value.

ReduceMode get_mode() const

Method to get mode attribute.

Returns

reduction mode.

bool get_reduce_to_end() const

Method to get reduce_to_end attribute.

Returns

a boolean value.

float get_coeff() const

Method to get coeff attribute.

Returns

a size factor applied to output.