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;
16 p_(OperatorBase::GetSingleArgument<int>(
"p", 2)),
17 average_(OperatorBase::GetSingleArgument<bool>(
"average",
false)) {
18 CAFFE_ENFORCE(p_ == 1 || p_ == 2,
"p should be either 1 or 2.");
21 bool RunOnDevice()
override;
31 template <
typename T,
class Context>
34 USE_OPERATOR_CONTEXT_FUNCTIONS;
37 p_(OperatorBase::GetSingleArgument<int>(
"p", 2)),
38 average_(OperatorBase::GetSingleArgument<bool>(
"average",
false)) {
39 CAFFE_ENFORCE(p_ == 1 || p_ == 2,
"p should be either 1 or 2.");
42 bool RunOnDevice()
override;
47 INPUT_TAGS(X_IN, DER_NORM_IN);
48 OUTPUT_TAGS(DER_X_OUT);
54 #endif // CAFFE2_OPERATORS_LPNORM_OP_H_ Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...