"vscode:/vscode.git/clone" did not exist on "cbf194fa4b9b4b9d9fc3a25f4872062addcd8c9c"
Commit 9e9aa5d1 authored by Martin Wicke's avatar Martin Wicke Committed by GitHub
Browse files

Update deep_cnn.py

parent 84a32a8c
...@@ -341,7 +341,7 @@ def loss_fun(logits, labels): ...@@ -341,7 +341,7 @@ def loss_fun(logits, labels):
# Calculate the cross entropy between labels and predictions # Calculate the cross entropy between labels and predictions
labels = tf.cast(labels, tf.int64) labels = tf.cast(labels, tf.int64)
cross_entropy = tf.nn.sparse_softmax_cross_entropy_with_logits( cross_entropy = tf.nn.sparse_softmax_cross_entropy_with_logits(
logits, labels, name='cross_entropy_per_example') logits=logits, labels=labels, name='cross_entropy_per_example')
# Calculate the average cross entropy loss across the batch. # Calculate the average cross entropy loss across the batch.
cross_entropy_mean = tf.reduce_mean(cross_entropy, name='cross_entropy') cross_entropy_mean = tf.reduce_mean(cross_entropy, name='cross_entropy')
......
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