Class Activation
- Defined in File activation.h 
Inheritance Relationships
Base Type
- public mindspore::ops::BaseOperator
Class Documentation
- 
class Activation : public mindspore::ops::BaseOperator
- Activation defined Activation operator prototype of lite. - Public Functions - 
inline Activation()
- Constructor. 
 - 
void Init(const float alpha = 0.2, const float min_val = -1.0, const float max_val = 1.0, const ActivationType &activation_type = NO_ACTIVATION, bool approximate = false)
- Method to init the op's attributes. - 参数
- alpha – [in] Define a size factor. 
- min_val – [in] Define a lower bound. 
- max_val – [in] Define a upper bound. 
- activation_type – [in] Define the activation type. 
- approximate – [in] Define a boolean value to decide whether to use an approximate algorithm, only useful for GELU. 
 
 
 - 
void set_alpha(const float alpha)
- Method to set alpha attribute. - 参数
- alpha – [in] Define a size factor. 
 
 - 
void set_min_val(const float min_val)
- Method to set min_val attribute. - 参数
- min_val – [in] Define a lower bound. 
 
 - 
void set_max_val(const float max_val)
- Method to set max_val attribute. - 参数
- max_val – [in] Define a upper bound. 
 
 - 
void set_activation_type(const ActivationType &activation_type)
- Method to set activation type. - 参数
- activation_type – [in] Define the activation type. 
 
 - 
float get_alpha() const
- Method to get alpha attribute. - 返回
- alpha attribute. 
 
 - 
float get_min_val() const
- Method to get min_val attribute. - 返回
- min_val attribute. 
 
 - 
float get_max_val() const
- Method to get max_val attribute. - 返回
- max_val attribute. 
 
 - 
ActivationType get_activation_type() const
- Method to get activation type. - 返回
- activation type. 
 
 - 
void set_approximate(bool approximate)
- Method to set approximate attribute. - 参数
- approximate – [in] Define a boolean value to decide whether to use an approximate algorithm, only useful for GELU. 
 
 - 
bool get_approximate() const
- Method to get approximate attribute. - 返回
- approximate attribute. 
 
 
- 
inline Activation()