1 #ifndef CAFFE2_OPERATORS_SELU_OP_H_ 2 #define CAFFE2_OPERATORS_SELU_OP_H_ 4 #include "caffe2/core/common_omp.h" 5 #include "caffe2/core/context.h" 6 #include "caffe2/core/logging.h" 7 #include "caffe2/core/operator.h" 11 template <
typename T,
class Context>
14 USE_OPERATOR_CONTEXT_FUNCTIONS;
16 template <
class... Args>
17 explicit SeluOp(Args&&... args)
19 alpha_ = this->
template GetSingleArgument<T>(
20 "alpha", 1.6732632423543772848170429916717f);
21 lambda_ = this->
template GetSingleArgument<T>(
22 "scale", 1.0507009873554804934193349852946f);
25 CAFFE_ENFORCE_GT(lambda_, 1.0);
28 bool RunOnDevice()
override;
35 template <
typename T,
class Context>
38 USE_OPERATOR_CONTEXT_FUNCTIONS;
39 template <
class... Args>
42 alpha_ = this->
template GetSingleArgument<T>(
43 "alpha", 1.6732632423543772848170429916717f);
44 lambda_ = this->
template GetSingleArgument<T>(
45 "scale", 1.0507009873554804934193349852946f);
46 CAFFE_ENFORCE_GT(lambda_, 1.0);
49 bool RunOnDevice()
override;
58 #endif // CAFFE2_OPERATORS_SELU_OP_H_
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...