1 #ifndef CAFFE2_OPERATORS_LPNORM_OP_H_ 2 #define CAFFE2_OPERATORS_LPNORM_OP_H_ 4 #include "caffe2/core/context.h" 5 #include "caffe2/core/operator.h" 6 #include "caffe2/utils/math.h" 10 template <
typename T,
class Context>
13 USE_OPERATOR_CONTEXT_FUNCTIONS;
14 template <
class... Args>
17 OP_SINGLE_ARG(
int,
"p", p_, 2),
18 OP_SINGLE_ARG(
bool,
"average", average_,
false) {
19 CAFFE_ENFORCE(p_ == 1 || p_ == 2,
"p should be either 1 or 2.");
22 bool RunOnDevice()
override;
29 template <
typename T,
class Context>
32 USE_OPERATOR_CONTEXT_FUNCTIONS;
33 template <
class... Args>
36 OP_SINGLE_ARG(
int,
"p", p_, 2),
37 OP_SINGLE_ARG(
bool,
"average", average_,
false) {
38 CAFFE_ENFORCE(p_ == 1 || p_ == 2,
"p should be either 1 or 2.");
41 bool RunOnDevice()
override;
50 #endif // CAFFE2_OPERATORS_LPNORM_OP_H_ A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...