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

Function TF_NewSession

tensorflow/c/c_api.cc:2159–2174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2157 : session(s), graph(g), last_num_graph_nodes(0), extend_before_run(true) {}
2158
2159TF_Session* TF_NewSession(TF_Graph* graph, const TF_SessionOptions* opt,
2160 TF_Status* status) {
2161 Session* session;
2162 status->status = NewSession(opt->options, &session);
2163 if (TF_GetCode(status) == TF_OK) {
2164 TF_Session* new_session = new TF_Session(session, graph);
2165 if (graph != nullptr) {
2166 mutex_lock l(graph->mu);
2167 graph->sessions[new_session] = "";
2168 }
2169 return new_session;
2170 } else {
2171 DCHECK_EQ(nullptr, session);
2172 return nullptr;
2173 }
2174}
2175
2176TF_Session* TF_LoadSessionFromSavedModel(
2177 const TF_SessionOptions* session_options, const TF_Buffer* run_options,

Callers 6

TF_NewSessionRefFunction · 0.85
CSessionMethod · 0.85
GPUDeviceNameFunction · 0.85
TESTFunction · 0.85
TEST_FFunction · 0.85

Calls 2

TF_GetCodeFunction · 0.85
NewSessionFunction · 0.50

Tested by 4

CSessionMethod · 0.68
GPUDeviceNameFunction · 0.68
TESTFunction · 0.68
TEST_FFunction · 0.68