diff --git a/tensorflow/python/ops/variables.py b/tensorflow/python/ops/variables.py index a4967e1c0f1..f9fc72a6da3 100644 --- a/tensorflow/python/ops/variables.py +++ b/tensorflow/python/ops/variables.py @@ -306,6 +306,7 @@ class Variable(six.with_metaclass(VariableMetaclass, Here replacing adding `use_resource=True` when constructing the variable will fix any nondeterminism issues: + ``` v = tf.Variable(True, use_resource=True) tf.cond(v, lambda: v.assign(False), my_false_fn)