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

Function MakeOpDef

tensorflow/c/ops_test.cc:176–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174#define C_SHP(x) reinterpret_cast<TF_ShapeHandle*>(x)
175
176static OpDef MakeOpDef(int num_inputs, int num_outputs) {
177 OpRegistrationData op_reg_data;
178 OpDefBuilder b("dummy");
179 for (int i = 0; i < num_inputs; ++i) {
180 b.Input(strings::StrCat("i", i, ": float"));
181 }
182 for (int i = 0; i < num_outputs; ++i) {
183 b.Output(strings::StrCat("o", i, ": float"));
184 }
185 CHECK(b.Attr("foo:string").Finalize(&op_reg_data).ok());
186 return op_reg_data.op_def;
187}
188
189// Tests for shape inference
190

Callers 1

TESTFunction · 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