diff options
author | 2016-11-09 08:21:50 -0800 | |
---|---|---|
committer | 2016-11-09 08:41:53 -0800 | |
commit | e580e721cc1a205cb4b7afe64bc6af4d775a4851 (patch) | |
tree | 04338afa9d4f905c632d084dd964261eae9b8668 /tensorflow/go/session.go | |
parent | 988fec702bb0c23613cfd3ba76d04bf41c1a7c59 (diff) |
C API: Rename TF_SessionWithGraph to TF_Session.
This makes the preferred API for graph construction and
execution have the simpler, more sensible names (TF_Session,
TF_NewSession etc.) and the older one which we hope to
eventually remove have the more awkward ones (TF_DeprecatedSession,
TF_NewDeprecatedSession etc.)
Change: 138641615
Diffstat (limited to 'tensorflow/go/session.go')
-rw-r--r-- | tensorflow/go/session.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/go/session.go b/tensorflow/go/session.go index 83dbbd8c04..430f69a8a4 100644 --- a/tensorflow/go/session.go +++ b/tensorflow/go/session.go @@ -34,7 +34,7 @@ import ( // perform the computation and potentially fetch outputs as Tensors. // A Session allows concurrent calls to Run(). type Session struct { - c *C.TF_SessionWithGraph + c *C.TF_Session // For ensuring that: // - Close() blocks on all Run() calls to complete. @@ -48,7 +48,7 @@ type Session struct { func NewSession(graph *Graph, options *SessionOptions) (*Session, error) { status := newStatus() cOpt := options.c() - cSess := C.TF_NewSessionWithGraph(graph.c, cOpt, status.c) + cSess := C.TF_NewSession(graph.c, cOpt, status.c) C.TF_DeleteSessionOptions(cOpt) if err := status.Err(); err != nil { return nil, err @@ -139,11 +139,11 @@ func (s *Session) Close() error { return nil } status := newStatus() - C.TF_CloseSessionWithGraph(s.c, status.c) + C.TF_CloseSession(s.c, status.c) if err := status.Err(); err != nil { return err } - C.TF_DeleteSessionWithGraph(s.c, status.c) + C.TF_DeleteSession(s.c, status.c) s.c = nil return status.Err() } |