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

Method GetSession

tensorflow/core/common_runtime/direct_session_group.cc:153–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153Session* DirectSessionGroup::GetSession(int32_t hint_id) {
154 int32_t id = 0;
155 Status s = GetServingSessionId(&id, hint_id);
156 if (!s.ok()) {
157 LOG(ERROR) << "Get serving session error, use default session[0]";
158 return sessions_[0].get();
159 }
160 return sessions_[id].get();
161}
162
163std::unique_ptr<Session>* DirectSessionGroup::GetSessionPtr(int id) {
164 if (id < 0 || id >= session_num_) {

Callers 2

LoadSavedModelInternalFunction · 0.80

Calls 2

okMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected