aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/saved_model
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-08-27 13:09:39 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-27 13:14:32 -0700
commitc09e01232ace0a5657828c9c47de942751c94949 (patch)
tree4a2134e52ff428b6518ef5b61bf3b009751f1c6b /tensorflow/python/saved_model
parentf468d9a4d9a551601a74edf0564bd6274513be9f (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.py2
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))