1 #include "caffe2/operators/reciprocal_op.h" 13 ReciprocalFunctor<CPUContext>>);
16 OPERATOR_SCHEMA(Reciprocal)
19 .AllowInplace({{0, 0}})
20 .IdenticalTypeAndShape()
22 Performs element-wise reciprocal ($\1/x$) of input tensor $X$. 25 - https://github.com/pytorch/pytorch/blob/master/caffe2/operators/reciprocal_op.cc 29 <summary> <b>Example</b> </summary> 35 workspace.ResetWorkspace() 37 op = core.CreateOperator( 43 workspace.FeedBlob("X", (np.random.randint(10, size=(3,3))).astype(np.float32)) 44 print("X:", workspace.FetchBlob("X")) 45 workspace.RunOperatorOnce(op) 46 print("Y:", workspace.FetchBlob("Y")) 59 [[0.125 0.3333333 0.3333333 ] 67 .Input(0, "X",
"*(type: Tensor`<float>`)* Input data tensor.")
68 .Output(0,
"Y",
"*(type: Tensor`<float>`)* Output tensor.");
70 OPERATOR_SCHEMA(ReciprocalGradient).NumInputs(2).NumOutputs(1).AllowInplace({{1, 0}});
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...