1 #ifndef CAFFE_OPERATORS_BATCH_BOX_COX_OPS_H_ 2 #define CAFFE_OPERATORS_BATCH_BOX_COX_OPS_H_ 4 #include "caffe2/core/context.h" 5 #include "caffe2/core/logging.h" 6 #include "caffe2/core/operator.h" 7 #include "caffe2/utils/math.h" 11 template <
class Context>
14 USE_OPERATOR_CONTEXT_FUNCTIONS;
18 OperatorBase::GetSingleArgument<int>(
"min_block_size", 256)) {}
20 bool RunOnDevice()
override {
40 void BoxCoxNonzeroLambda(
49 void BoxCoxZeroLambda(
57 void BoxCoxMixedLambda(
59 const vector<int>& nonzeros,
60 const vector<int>& zeros,
68 vector<int> nonzeros_, zeros_;
71 struct CachedBuffers {
72 virtual ~CachedBuffers() {}
76 struct TypedCachedBuffers :
public CachedBuffers {
77 vector<T> lambda1_, lambda2_, lambda2_z_;
78 vector<T> accumulator_;
81 TypedCachedBuffers<T>& GetBuffers();
82 unique_ptr<CachedBuffers> buffers_;
84 #endif // CAFFE2_USE_MKL 88 INPUT_TAGS(DATA, LAMBDA1, LAMBDA2);
93 #endif // CAFFE_OPERATORS_BATCH_BOX_COX_OPS_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 ...