1 #ifndef CAFFE2_OPERATORS_PACK_SEGMENTS_H_ 2 #define CAFFE2_OPERATORS_PACK_SEGMENTS_H_ 7 #include <unordered_map> 9 #include "caffe2/core/operator.h" 10 #include "caffe2/core/tensor.h" 11 #include "caffe2/utils/math.h" 15 template <
class Context>
18 USE_OPERATOR_CONTEXT_FUNCTIONS;
24 pad_minf_(OperatorBase::GetSingleArgument<bool>(
"pad_minf",
false)),
25 return_presence_mask_(OperatorBase::GetSingleArgument<bool>(
26 "return_presence_mask",
29 padding_ = -1.0 * std::numeric_limits<float>::infinity();
42 template <
typename T,
typename Data_T>
43 bool DoRunWithType2();
45 INPUT_TAGS(LENGTHS, DATA);
50 bool return_presence_mask_;
59 template <
class Context>
62 USE_OPERATOR_CONTEXT_FUNCTIONS;
66 bool RunOnDevice()
override {
73 template <
typename T,
typename Data_T>
74 bool DoRunWithType2();
76 INPUT_TAGS(LENGTHS, DATA);
88 #endif // CAFFE2_OPERATORS_PACK_SEGMENTS_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 ...