From ae24110d168d15f9d107aa62207110c113b040cf Mon Sep 17 00:00:00 2001 From: David Date: Sat, 22 Jul 2017 12:03:58 +0200 Subject: [PATCH] Update FCN.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit from TF version 1.1> sparse_softmax_cross_entropy needs to be called with explicit logits and labels declaration --- FCN.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FCN.py b/FCN.py index d4825f5..56dca50 100644 --- a/FCN.py +++ b/FCN.py @@ -155,8 +155,8 @@ def main(argv=None): tf.summary.image("input_image", image, max_outputs=2) tf.summary.image("ground_truth", tf.cast(annotation, tf.uint8), max_outputs=2) tf.summary.image("pred_annotation", tf.cast(pred_annotation, tf.uint8), max_outputs=2) - loss = tf.reduce_mean((tf.nn.sparse_softmax_cross_entropy_with_logits(logits, - tf.squeeze(annotation, squeeze_dims=[3]), + loss = tf.reduce_mean((tf.nn.sparse_softmax_cross_entropy_with_logits(logits=logits, + labels=tf.squeeze(annotation, squeeze_dims=[3]), name="entropy"))) tf.summary.scalar("entropy", loss)