Skip to content

Commit bc09f95

Browse files
reduce mean instead of sum
1 parent 534b4fe commit bc09f95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/4_Utils/tensorboard_advanced.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def multilayer_perceptron(x, weights, biases):
7171

7272
with tf.name_scope('Loss'):
7373
# Softmax Cross entropy (cost function)
74-
loss = tf.reduce_sum(tf.nn.softmax_cross_entropy_with_logits(logits=pred, labels=y))
74+
loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=pred, labels=y))
7575

7676
with tf.name_scope('SGD'):
7777
# Gradient Descent

0 commit comments

Comments
 (0)