Program Listing for File activation.h
↰ Return to documentation for file (include/converter/include/ops/fusion/activation.h
)
#ifndef MINDSPORE_CORE_OPS_ACTIVATION_H_
#define MINDSPORE_CORE_OPS_ACTIVATION_H_
#include "mindapi/base/types.h"
#include "ops/base_operator.h"
namespace mindspore {
namespace ops {
constexpr auto kNameActivation = "Activation";
class MIND_API Activation : public BaseOperator {
public:
MIND_API_BASE_MEMBER(Activation);
Activation() : BaseOperator(kNameActivation) {}
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);
void set_alpha(const float alpha);
void set_min_val(const float min_val);
void set_max_val(const float max_val);
void set_activation_type(const ActivationType &activation_type);
float get_alpha() const;
float get_min_val() const;
float get_max_val() const;
ActivationType get_activation_type() const;
void set_approximate(bool approximate);
bool get_approximate() const;
};
} // namespace ops
} // namespace mindspore
#endif // MINDSPORE_CORE_OPS_ACTIVATION_H_