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

Method Close

tensorflow/go/session.go:271–286  ·  view source on GitHub ↗

Close a session. This contacts any other processes associated with this session, if applicable. Blocks until all previous calls to Run have returned.

()

Source from the content-addressed store, hash-verified

269// Close a session. This contacts any other processes associated with this
270// session, if applicable. Blocks until all previous calls to Run have returned.
271func (s *Session) Close() error {
272 s.mu.Lock()
273 defer s.mu.Unlock()
274 s.wg.Wait()
275 if s.c == nil {
276 return nil
277 }
278 status := newStatus()
279 C.TF_CloseSession(s.c, status.c)
280 if err := status.Err(); err != nil {
281 return err
282 }
283 C.TF_DeleteSession(s.c, status.c)
284 s.c = nil
285 return status.Err()
286}
287
288// SessionOptions contains configuration information for a session.
289type SessionOptions struct {

Callers 10

ExampleFunction · 0.95
makeTensorFromImageFunction · 0.95
LoadSavedModelFunction · 0.95
TestSessionRunNegFunction · 0.95
TestConcurrencyFunction · 0.95
ExamplePartialRunFunction · 0.95
NewSessionFunction · 0.95
printBestLabelFunction · 0.45
downloadFunction · 0.45
unzipFunction · 0.45

Calls 5

newStatusFunction · 0.85
LockMethod · 0.80
UnlockMethod · 0.80
WaitMethod · 0.45
ErrMethod · 0.45

Tested by 8

ExampleFunction · 0.76
makeTensorFromImageFunction · 0.76
TestSessionRunNegFunction · 0.76
TestConcurrencyFunction · 0.76
ExamplePartialRunFunction · 0.76
printBestLabelFunction · 0.36
downloadFunction · 0.36
unzipFunction · 0.36