Skip to content
This repository was archived by the owner on Jan 1, 2021. It is now read-only.

Commit 642ba95

Browse files
authored
Update 03_logistic_regression_mnist_sol.py
1 parent aabe1c2 commit 642ba95

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/03_logistic_regression_mnist_sol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
total_correct_preds = 0
7878
for i in range(n_batches):
7979
X_batch, Y_batch = mnist.test.next_batch(batch_size)
80-
_, loss_batch, logits_batch = sess.run([optimizer, loss, logits], feed_dict={X: X_batch, Y:Y_batch})
80+
loss_batch, logits_batch = sess.run([loss, logits], feed_dict={X: X_batch, Y:Y_batch})
8181
preds = tf.nn.softmax(logits_batch)
8282
correct_preds = tf.equal(tf.argmax(preds, 1), tf.argmax(Y_batch, 1))
8383
accuracy = tf.reduce_sum(tf.cast(correct_preds, tf.float32)) # need numpy.count_nonzero(boolarr) :(

0 commit comments

Comments
 (0)