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

Method SetUp

tensorflow/c/c_api_test.cc:1199–1212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1197 CApiColocationTest() : s_(TF_NewStatus()), graph_(TF_NewGraph()) {}
1198
1199 void SetUp() override {
1200 feed1_ = Placeholder(graph_, s_, "feed1");
1201 ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_);
1202
1203 feed2_ = Placeholder(graph_, s_, "feed2");
1204 ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_);
1205
1206 constant_ = ScalarConst(10, graph_, s_);
1207 ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_);
1208
1209 desc_ = TF_NewOperation(graph_, "AddN", "add");
1210 TF_Output inputs[] = {{feed1_, 0}, {constant_, 0}};
1211 TF_AddInputList(desc_, inputs, TF_ARRAYSIZE(inputs));
1212 }
1213
1214 ~CApiColocationTest() override {
1215 TF_DeleteGraph(graph_);

Callers

nothing calls this directly

Calls 6

TF_GetCodeFunction · 0.85
TF_MessageFunction · 0.85
ScalarConstFunction · 0.85
TF_NewOperationFunction · 0.85
TF_AddInputListFunction · 0.85
PlaceholderFunction · 0.70

Tested by

no test coverage detected