Commit e93ec372 authored by Martin Wicke's avatar Martin Wicke Committed by GitHub
Browse files

Fix xent call in mnist tutorial code

Fixes #857.
parent 4b53df3c
...@@ -228,7 +228,7 @@ def main(_): ...@@ -228,7 +228,7 @@ def main(_):
# Training computation: logits + cross-entropy loss. # Training computation: logits + cross-entropy loss.
logits = model(train_data_node, True) logits = model(train_data_node, True)
loss = tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits( loss = tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(
logits, train_labels_node)) labels=train_labels_node, logits=logits))
# L2 regularization for the fully connected parameters. # L2 regularization for the fully connected parameters.
regularizers = (tf.nn.l2_loss(fc1_weights) + tf.nn.l2_loss(fc1_biases) + regularizers = (tf.nn.l2_loss(fc1_weights) + tf.nn.l2_loss(fc1_biases) +
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment