diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-08-27 13:09:39 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-27 13:14:32 -0700 |
commit | c09e01232ace0a5657828c9c47de942751c94949 (patch) | |
tree | 4a2134e52ff428b6518ef5b61bf3b009751f1c6b /tensorflow/python/saved_model | |
parent | f468d9a4d9a551601a74edf0564bd6274513be9f (diff) |
Simplify logic that defaults to the default graph when no graph is passed into saved_models.utils.get_tensor_from_tensor_info
PiperOrigin-RevId: 210417762
Diffstat (limited to 'tensorflow/python/saved_model')
-rw-r--r-- | tensorflow/python/saved_model/utils_impl.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/saved_model/utils_impl.py b/tensorflow/python/saved_model/utils_impl.py index 20ff34fd8e..06d09325c8 100644 --- a/tensorflow/python/saved_model/utils_impl.py +++ b/tensorflow/python/saved_model/utils_impl.py @@ -75,7 +75,7 @@ def get_tensor_from_tensor_info(tensor_info, graph=None, import_scope=None): KeyError: If `tensor_info` does not correspond to a tensor in `graph`. ValueError: If `tensor_info` is malformed. """ - graph = graph if graph is not None else ops.get_default_graph() + graph = graph or ops.get_default_graph() def _get_tensor(name): return graph.get_tensor_by_name( ops.prepend_name_scope(name, import_scope=import_scope)) |