Skip to content

Commit 1906b16

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LeNet-Lab-Solution.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309
"rate = 0.001\n",
310310
"\n",
311311
"logits = LeNet(x)\n",
312-
"cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits, one_hot_y)\n",
312+
"cross_entropy = tf.nn.softmax_cross_entropy_with_logits(labels=one_hot_y, logits=logits)\n",
313313
"loss_operation = tf.reduce_mean(cross_entropy)\n",
314314
"optimizer = tf.train.AdamOptimizer(learning_rate = rate)\n",
315315
"training_operation = optimizer.minimize(loss_operation)"

0 commit comments

Comments
 (0)