| 110 | } |
| 111 | |
| 112 | std::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 | |
| 129 | NodeDef* GrapplerTest::AddNode( |
| 130 | const string& name, const string& op, const std::vector<string>& inputs, |
nothing calls this directly
no test coverage detected