Forráskód Böngészése

reduce mean instead of sum

Aymeric Damien 8 éve
szülő
commit
bc09f959c0
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      examples/4_Utils/tensorboard_advanced.py

+ 1 - 1
examples/4_Utils/tensorboard_advanced.py

@@ -71,7 +71,7 @@ with tf.name_scope('Model'):
 
 with tf.name_scope('Loss'):
     # Softmax Cross entropy (cost function)
-    loss = tf.reduce_sum(tf.nn.softmax_cross_entropy_with_logits(logits=pred, labels=y))
+    loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=pred, labels=y))
 
 with tf.name_scope('SGD'):
     # Gradient Descent