1 #include "caffe2/operators/given_tensor_fill_op.h" 5 REGISTER_CPU_OPERATOR(GivenTensorFill, GivenTensorFillOp<float, CPUContext>);
8 GivenTensorFillOp<double, CPUContext>);
9 REGISTER_CPU_OPERATOR(GivenTensorBoolFill, GivenTensorFillOp<bool, CPUContext>);
10 REGISTER_CPU_OPERATOR(GivenTensorIntFill, GivenTensorFillOp<int, CPUContext>);
11 REGISTER_CPU_OPERATOR(
13 GivenTensorFillOp<int64_t, CPUContext>);
14 REGISTER_CPU_OPERATOR(
15 GivenTensorStringFill,
16 GivenTensorFillOp<std::string, CPUContext>);
18 NO_GRADIENT(GivenTensorFill);
19 NO_GRADIENT(GivenTensorDoubleFill);
20 NO_GRADIENT(GivenTensorBoolFill);
21 NO_GRADIENT(GivenTensorIntFill);
22 NO_GRADIENT(GivenTensorInt64Fill);
23 NO_GRADIENT(GivenTensorStringFill);
25 OPERATOR_SCHEMA(GivenTensorFill)
28 .AllowInplace({{0, 0}})
29 .TensorInferenceFunction(FillerTensorInference<>);
30 OPERATOR_SCHEMA(GivenTensorDoubleFill)
33 .AllowInplace({{0, 0}})
34 .TensorInferenceFunction(
35 FillerTensorInference<TensorProto_DataType_DOUBLE>);
36 OPERATOR_SCHEMA(GivenTensorBoolFill)
39 .AllowInplace({{0, 0}})
40 .TensorInferenceFunction(FillerTensorInference<TensorProto_DataType_BOOL>);
41 OPERATOR_SCHEMA(GivenTensorIntFill)
44 .AllowInplace({{0, 0}})
45 .TensorInferenceFunction(FillerTensorInference<TensorProto_DataType_INT32>);
46 OPERATOR_SCHEMA(GivenTensorInt64Fill)
49 .AllowInplace({{0, 0}})
50 .TensorInferenceFunction(FillerTensorInference<TensorProto_DataType_INT64>);
51 OPERATOR_SCHEMA(GivenTensorStringFill)
54 .AllowInplace({{0, 0}})
55 .TensorInferenceFunction(
56 FillerTensorInference<TensorProto_DataType_STRING>);
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...