Skip to content

Commit f24919e

Browse files
authored
correct cross entropy syntax
1 parent 1906b16 commit f24919e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LeNet-Lab.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@
287287
"rate = 0.001\n",
288288
"\n",
289289
"logits = LeNet(x)\n",
290-
"cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits, one_hot_y)\n",
290+
"cross_entropy = tf.nn.softmax_cross_entropy_with_logits(labels=one_hot_y, logits=logits)\n",
291291
"loss_operation = tf.reduce_mean(cross_entropy)\n",
292292
"optimizer = tf.train.AdamOptimizer(learning_rate = rate)\n",
293293
"training_operation = optimizer.minimize(loss_operation)"

0 commit comments

Comments
 (0)