MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / MakeOpDef

Function MakeOpDef

tensorflow/core/framework/shape_inference_test.cc:102–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102static OpDef MakeOpDef(int num_inputs, int num_outputs) {
103 OpRegistrationData op_reg_data;
104 OpDefBuilder b("dummy");
105 for (int i = 0; i < num_inputs; ++i) {
106 b.Input(strings::StrCat("i", i, ": float"));
107 }
108 for (int i = 0; i < num_outputs; ++i) {
109 b.Output(strings::StrCat("o", i, ": float"));
110 }
111 CHECK(b.Attr("foo:string").Finalize(&op_reg_data).ok());
112 return op_reg_data.op_def;
113}
114
115TEST_F(ShapeInferenceTest, DimensionOrConstant) {
116 NodeDef def;

Callers 3

TEST_FFunction · 0.70
TestMergeHandlesMethod · 0.70
TestRelaxHandlesMethod · 0.70

Calls 6

StrCatFunction · 0.50
InputMethod · 0.45
OutputMethod · 0.45
okMethod · 0.45
FinalizeMethod · 0.45
AttrMethod · 0.45

Tested by

no test coverage detected