17 #ifndef SMOOTH_L1_LOSS_OP_H_ 18 #define SMOOTH_L1_LOSS_OP_H_ 20 #include "caffe2/core/context.h" 21 #include "caffe2/core/logging.h" 22 #include "caffe2/core/operator.h" 23 #include "caffe2/utils/math.h" 27 template <
typename T,
class Context>
32 beta_(OperatorBase::GetSingleArgument<float>(
"beta", 1.)),
33 scale_(OperatorBase::GetSingleArgument<float>(
"scale", 1.)) {
34 CAFFE_ENFORCE(beta_ > 0);
35 CAFFE_ENFORCE(scale_ >= 0);
37 USE_OPERATOR_CONTEXT_FUNCTIONS;
39 bool RunOnDevice()
override {
41 CAFFE_NOT_IMPLEMENTED;
50 template <
typename T,
class Context>
55 beta_(OperatorBase::GetSingleArgument<float>(
"beta", 1.)),
56 scale_(OperatorBase::GetSingleArgument<float>(
"scale", 1.)) {
57 CAFFE_ENFORCE(beta_ > 0);
58 CAFFE_ENFORCE(scale_ >= 0);
60 USE_OPERATOR_CONTEXT_FUNCTIONS;
62 bool RunOnDevice()
override {
64 CAFFE_NOT_IMPLEMENTED;
75 #endif // SMOOTH_L1_LOSS_OP_H_
Tensor is the basic class in Caffe2 that stores a contiguous memory with its shape information...
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 ...