diff options
author | Jonathan Hseu <jhseu@google.com> | 2017-02-08 11:55:21 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-02-08 12:08:23 -0800 |
commit | 085102c2e2947d76056b6363da96c55ecd838e6c (patch) | |
tree | 4fb72284384f7e985503b959a33e9322f6b7a13c /tensorflow/go/session_test.go | |
parent | 42dc6764a0518ec0937bb9d94949c2af29508371 (diff) |
SavedModel support in Go.
Change: 146938337
Diffstat (limited to 'tensorflow/go/session_test.go')
-rw-r--r-- | tensorflow/go/session_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tensorflow/go/session_test.go b/tensorflow/go/session_test.go index 14ecca402b..ccd7d85295 100644 --- a/tensorflow/go/session_test.go +++ b/tensorflow/go/session_test.go @@ -181,3 +181,15 @@ func TestConcurrency(t *testing.T) { t.Errorf("Close() 2: %v", err) } } + +func TestSavedModel(t *testing.T) { + _, graph, err := LoadSavedModel("../cc/saved_model/testdata/half_plus_two/00000123", []string{"serve"}, nil) + if err != nil { + t.Fatalf("LoadSavedModel(): %v", err) + } + if op := graph.Operation("y"); op == nil { + t.Fatalf("\"y\" not found in graph") + } + // TODO(jhseu): half_plus_two has a tf.Example proto dependency to run. Add a + // more thorough test when the generated protobufs are available. +} |