aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow
diff options
context:
space:
mode:
authorGravatar Thomas Schumm <fwiffo@google.com>2017-03-07 13:51:00 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-03-07 14:13:03 -0800
commit258d0a92c2816ec8850fb6460ed04e87dbcc44c8 (patch)
treece4f4a6458c82250bc7ced375e925d357a9c1799 /tensorflow
parentb59b9043afd453d952dc6ae829fa05f68408e3b6 (diff)
Fix confusing backwards error message in tf.cond.
res_t corresponds to fn1 and res_f corresponds to fn2. Change: 149461652
Diffstat (limited to 'tensorflow')
-rw-r--r--tensorflow/python/ops/control_flow_ops.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/ops/control_flow_ops.py b/tensorflow/python/ops/control_flow_ops.py
index 011b58a246..308e762320 100644
--- a/tensorflow/python/ops/control_flow_ops.py
+++ b/tensorflow/python/ops/control_flow_ops.py
@@ -1754,7 +1754,7 @@ def cond(pred, fn1, fn2, name=None):
raise ValueError("fn1 and fn2 must return the same number of results.")
if not res_t:
raise ValueError("fn1 and fn2 must return at least one result.")
- for x, y in zip(res_f, res_t):
+ for x, y in zip(res_t, res_f):
assert ((isinstance(x, ops.IndexedSlices) and
isinstance(y, ops.IndexedSlices)) or
(isinstance(x, sparse_tensor.SparseTensor) and