Caffe2 - C++ API
A deep learning, cross platform ML framework
floor_op.cc
1 #include "caffe2/operators/floor_op.h"
2 
3 #include "caffe2/utils/math.h"
4 
5 namespace caffe2 {
6 
7 REGISTER_CPU_OPERATOR(Floor, FloorOp<float, CPUContext>);
8 
9 OPERATOR_SCHEMA(Floor)
10  .NumInputs(1)
11  .NumOutputs(1)
12  .AllowInplace({{0, 0}})
13  .SetDoc(R"DOC(
14 Floor takes one input data (Tensor<T>) and produces one output data
15 (Tensor<T>) where the floor function, y = floor(x), is applied to
16 the tensor elementwise. Currently supports only float32.
17 )DOC")
18  .Input(0, "X", "ND input tensor")
19  .Output(0, "Y", "ND input tensor");
20 
21 // TODO: Write gradient for this when needed
22 GRADIENT_NOT_IMPLEMENTED_YET(Floor);
23 
24 } // namespace caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...