aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/summary
diff options
context:
space:
mode:
authorGravatar Justine Tunney <jart@google.com>2017-11-03 20:58:16 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-11-03 21:01:57 -0700
commit55e0fd903f45d9be6c212d3bc09057b634b52202 (patch)
treed7083bf58a1c1b42b25f2249aa8c28f4c8e97a0a /tensorflow/contrib/summary
parent11c8cc337eb5e41c1695e4d6f4e8b25cdd4d9545 (diff)
Fix bad_color param on tf.contrib.summary.image
PiperOrigin-RevId: 174549117
Diffstat (limited to 'tensorflow/contrib/summary')
-rw-r--r--tensorflow/contrib/summary/summary_ops.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/summary/summary_ops.py b/tensorflow/contrib/summary/summary_ops.py
index ecfa6baeff..56e3198593 100644
--- a/tensorflow/contrib/summary/summary_ops.py
+++ b/tensorflow/contrib/summary/summary_ops.py
@@ -246,8 +246,8 @@ def image(name, tensor, bad_color=None, max_images=3, family=None):
"""Writes an image summary if possible."""
def function(tag, scope):
- if bad_color is None:
- bad_color_ = constant_op.constant([255, 0, 0, 255], dtype=dtypes.uint8)
+ bad_color_ = (constant_op.constant([255, 0, 0, 255], dtype=dtypes.uint8)
+ if bad_color is None else bad_color)
# Note the identity to move the tensor to the CPU.
return gen_summary_ops.write_image_summary(
context.context().summary_writer_resource,