2 #ifndef CAFFE2_OPERATORS_LENGTHS_TOP_K_OP_H_ 3 #define CAFFE2_OPERATORS_LENGTHS_TOP_K_OP_H_ 5 #include "caffe2/core/context.h" 6 #include "caffe2/core/logging.h" 7 #include "caffe2/core/operator.h" 8 #include "caffe2/operators/conv_pool_op_base.h" 9 #include "caffe2/utils/math.h" 12 template <
typename T,
class Context>
15 USE_OPERATOR_CONTEXT_FUNCTIONS;
19 CAFFE_ENFORCE_GE(k_, 1,
"k argument must be >= 1");
22 bool RunOnDevice()
override;
26 INPUT_TAGS(X_IN, Y_IN);
27 OUTPUT_TAGS(TOPK_VALUES_OUT, TOPK_INDICES_OUT);
30 template <
typename T,
class Context>
35 CAFFE_ENFORCE_GE(k_, 1,
"k argument must be >= 1");
37 USE_OPERATOR_CONTEXT_FUNCTIONS;
39 bool RunOnDevice()
override;
43 INPUT_TAGS(LENGTH_IN, INDICES_IN, DER_TOPK_IN);
44 OUTPUT_TAGS(DER_X_OUT);
49 #endif // CAFFE2_OPERATORS_LENGTHS_TOP_K_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 ...