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

Method FromNodeDef

tensorflow/core/graph/graph_test.cc:93–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 }
92
93 Node* FromNodeDef(const string& name, const string& node_type,
94 int num_inputs) {
95 auto builder = NodeDefBuilder(name, node_type);
96 for (int i = 0; i < num_inputs; ++i) {
97 builder = builder.Input(strings::StrCat("node_", i), i, DT_FLOAT);
98 }
99
100 NodeDef node_def;
101 TF_CHECK_OK(builder.Finalize(&node_def));
102
103 Status s;
104 Node* node = graph_.AddNode(node_def, &s);
105 TF_CHECK_OK(s);
106 return node;
107 }
108
109 void FromGraphDef(const string& gdef_ascii) {
110 GraphDef gdef;

Callers

nothing calls this directly

Calls 5

NodeDefBuilderClass · 0.85
StrCatFunction · 0.50
InputMethod · 0.45
FinalizeMethod · 0.45
AddNodeMethod · 0.45

Tested by

no test coverage detected