1 #include "caffe2/operators/shape_op.h" 5 REGISTER_CPU_OPERATOR(Shape, ShapeOp<CPUContext>);
10 .TensorInferenceFunction([](
const OperatorDef& ,
11 const vector<TensorShape>& in) {
12 vector<TensorShape> out(1);
13 out[0].add_dims(in[0].dims().size());
14 out[0].set_data_type(TensorProto::INT32);
17 .SetDoc(
"Produce a 1D int64 tensor with the shape of the input tensor.");
19 SHOULD_NOT_DO_GRADIENT(Shape);
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...