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

Function GetGraphDef

tensorflow/c/c_test_util.cc:388–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386}
387
388bool GetGraphDef(TF_Graph* graph, tensorflow::GraphDef* graph_def) {
389 TF_Status* s = TF_NewStatus();
390 TF_Buffer* buffer = TF_NewBuffer();
391 TF_GraphToGraphDef(graph, buffer, s);
392 bool ret = TF_GetCode(s) == TF_OK;
393 EXPECT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
394 if (ret) ret = graph_def->ParseFromArray(buffer->data, buffer->length);
395 TF_DeleteBuffer(buffer);
396 TF_DeleteStatus(s);
397 return ret;
398}
399
400bool GetNodeDef(TF_Operation* oper, tensorflow::NodeDef* node_def) {
401 TF_Status* s = TF_NewStatus();

Callers 3

TEST_FFunction · 0.85
TESTFunction · 0.85
TestGradientsSuccessMethod · 0.85

Calls 7

TF_NewStatusFunction · 0.85
TF_NewBufferFunction · 0.85
TF_GraphToGraphDefFunction · 0.85
TF_GetCodeFunction · 0.85
TF_MessageFunction · 0.85
TF_DeleteBufferFunction · 0.85
TF_DeleteStatusFunction · 0.85

Tested by

no test coverage detected