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

Method EvaluateFetchNodes

tensorflow/core/grappler/utils/grappler_test.cc:112–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112std::vector<Tensor> GrapplerTest::EvaluateFetchNodes(
113 const GrapplerItem& item) const {
114 std::unique_ptr<tensorflow::Session> session(NewSession(options_));
115 TF_CHECK_OK(session->Create(item.graph));
116 RunOptions run_options;
117 if (!item.init_ops.empty()) {
118 std::vector<Tensor> dummy;
119 TF_CHECK_OK(
120 session->Run(run_options, {}, {}, item.init_ops, &dummy, nullptr));
121 }
122 std::vector<Tensor> output_tensors;
123 TF_CHECK_OK(session->Run(run_options, item.feed, item.fetch, {},
124 &output_tensors, nullptr));
125 TF_CHECK_OK(session->Close());
126 return output_tensors;
127}
128
129NodeDef* GrapplerTest::AddNode(
130 const string& name, const string& op, const std::vector<string>& inputs,

Callers

nothing calls this directly

Calls 5

NewSessionFunction · 0.50
CreateMethod · 0.45
emptyMethod · 0.45
RunMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected