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;
    17   template <
class... Args>
    20         OP_SINGLE_ARG(
int, 
"k", k_, -1) {
    21     CAFFE_ENFORCE_GE(k_, 1, 
"k argument must be >= 1");
    24   bool RunOnDevice() 
override;
    28   INPUT_TAGS(X_IN, Y_IN);
    29   OUTPUT_TAGS(TOPK_VALUES_OUT, TOPK_INDICES_OUT);
    32 template <
typename T, 
class Context>
    35   template <
class... Args>
    38         OP_SINGLE_ARG(
int, 
"k", k_, -1) {
    39     CAFFE_ENFORCE_GE(k_, 1, 
"k argument must be >= 1");
    41   USE_OPERATOR_CONTEXT_FUNCTIONS;
    43   bool RunOnDevice() 
override;
    47   INPUT_TAGS(LENGTH_IN, INDICES_IN, DER_TOPK_IN);
    48   OUTPUT_TAGS(DER_X_OUT);
    53 #endif // CAFFE2_OPERATORS_LENGTHS_TOP_K_OP_H_ 
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...