diff options
Diffstat (limited to 'tensorflow/python/ops/state_ops.py')
-rw-r--r-- | tensorflow/python/ops/state_ops.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tensorflow/python/ops/state_ops.py b/tensorflow/python/ops/state_ops.py index 8cb6a0537e..2c93cf72c7 100644 --- a/tensorflow/python/ops/state_ops.py +++ b/tensorflow/python/ops/state_ops.py @@ -19,7 +19,6 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function -from tensorflow.python.eager import context from tensorflow.python.framework import ops from tensorflow.python.framework import tensor_shape from tensorflow.python.ops import gen_resource_variable_ops @@ -124,9 +123,7 @@ def is_variable_initialized(ref, name=None): if ref.dtype._is_ref_dtype: return gen_state_ops.is_variable_initialized(ref=ref, name=name) # Handle resource variables. - if context.executing_eagerly() or ref.op.type == "VarHandleOp": - return gen_resource_variable_ops.var_is_initialized_op(ref.handle, - name=name) + return ref.is_initialized(name=name) @tf_export("assign_sub") |