1 #include "caffe2/operators/ceil_op.h" 3 #include "caffe2/utils/math.h" 7 REGISTER_CPU_OPERATOR(Ceil, CeilOp<float, CPUContext>);
12 .AllowInplace({{0, 0}})
14 Element-wise application of the ceil function ($y=ceil(x)$) to the input tensor 15 `X`. Output tensor shape is the same as the input tensor. 18 - https://github.com/pytorch/pytorch/blob/master/caffe2/operators/ceil_op.cc 22 <summary> <b>Example</b> </summary> 28 workspace.ResetWorkspace() 30 op = core.CreateOperator( 36 workspace.FeedBlob("X", (np.random.uniform(-10, 10, (5,5))).astype(np.float32)) 37 print("X before running op:", workspace.FetchBlob("X")) 38 workspace.RunOperatorOnce(op) 39 print("X after running op:", workspace.FetchBlob("X")) 48 [[ 8.44598 -6.5098248 -2.2993476 -7.6859694 0.58566964] 49 [-7.846551 -0.03689406 6.9362907 -4.0521703 4.4969673 ] 50 [ 0.33355865 -7.895527 -8.393201 9.374202 -2.3930092 ] 51 [-6.3061996 3.1403487 3.782099 -8.516556 -2.8387244 ] 52 [-2.0164998 4.7663913 -3.422966 0.3636999 8.75713 ]] 65 .Input(0, "X",
"*(type: Tensor`<float>`)* Input tensor.")
66 .Output(0,
"Y",
"*(type: Tensor`<float>`)* Output tensor.");
69 GRADIENT_NOT_IMPLEMENTED_YET(Ceil);
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...