Caffe2 - C++ API
A deep learning, cross platform ML framework
find_duplicate_elements_op.cc
1 
17 #include "caffe2/operators/find_duplicate_elements_op.h"
18 
19 namespace caffe2 {
20 namespace {
21 REGISTER_CPU_OPERATOR(
22  FindDuplicateElements,
23  FindDuplicateElementsOp<CPUContext>);
24 
25 OPERATOR_SCHEMA(FindDuplicateElements)
26  .NumInputs(1)
27  .NumOutputs(1)
28  .SetDoc(R"DOC(
29 Shrink the data tensor by removing data blocks with given zero-based indices in
30 the outermost dimension of the tensor. Indices are not assumed in any order or
31 unique but with the range [0, blocks_size). Indices could be empty.
32  )DOC")
33  .Input(0, "data", "a 1-D tensor.")
34  .Output(
35  0,
36  "indices",
37  "indices of duplicate elements in data, excluding first occurrences.");
38 
39 SHOULD_NOT_DO_GRADIENT(FindDuplicateElements);
40 } // namespace
41 } // namespace caffe2
Copyright (c) 2016-present, Facebook, Inc.