diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-07-07 14:03:48 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-07-07 14:11:29 -0700 |
commit | b1b7d5930ecdc9412e7a3035bdd2be49e9cfc230 (patch) | |
tree | 44de31557bac8640d0b6086d5e3d2935bb97982b /tensorflow/contrib/saved_model | |
parent | 996605b0e4ef96e6732f7496abf44b6e5e1eb504 (diff) |
Add a tag constant, gpu, to present graph with GPU support.
PiperOrigin-RevId: 161242660
Diffstat (limited to 'tensorflow/contrib/saved_model')
-rw-r--r-- | tensorflow/contrib/saved_model/python/saved_model/reader_test.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tensorflow/contrib/saved_model/python/saved_model/reader_test.py b/tensorflow/contrib/saved_model/python/saved_model/reader_test.py index 76d5a3e96d..a8331cbc8f 100644 --- a/tensorflow/contrib/saved_model/python/saved_model/reader_test.py +++ b/tensorflow/contrib/saved_model/python/saved_model/reader_test.py @@ -81,16 +81,23 @@ class ReaderTest(test.TestCase): # Graph that updates the single variable. SavedModel is invoked: # - to add the model (weights are not updated). - # - multiple custom tags. + # - multiple predefined tags. with self.test_session(graph=ops.Graph()) as sess: self._init_and_validate_variable(sess, "v", 44) + builder.add_meta_graph([tag_constants.SERVING, tag_constants.GPU]) + + # Graph that updates the single variable. SavedModel is invoked: + # - to add the model (weights are not updated). + # - multiple custom tags. + with self.test_session(graph=ops.Graph()) as sess: + self._init_and_validate_variable(sess, "v", 45) builder.add_meta_graph(["foo", "bar"]) # Save the SavedModel to disk. builder.save() actual_tags = reader.get_saved_model_tag_sets(saved_model_dir) - expected_tags = [["train"], ["serve"], ["foo", "bar"]] + expected_tags = [["train"], ["serve"], ["serve", "gpu"], ["foo", "bar"]] self.assertEqual(expected_tags, actual_tags) |