Skip to content

Commit

Permalink
Minor improvement in chapter 10
Browse files Browse the repository at this point in the history
  • Loading branch information
ageron committed Oct 6, 2016
1 parent 5909b3b commit cbb757f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 10_introduction_to_artificial_neural_networks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
"with tf.Session() as sess:\n",
" init.run()\n",
" for epoch in range(n_epochs):\n",
" for iteration in range(len(mnist.test.labels)//batch_size):\n",
" for iteration in range(mnist.train.num_examples // batch_size):\n",
" X_batch, y_batch = mnist.train.next_batch(batch_size)\n",
" sess.run(training_op, feed_dict={X: X_batch, y: y_batch})\n",
" acc_train = accuracy.eval(feed_dict={X: X_batch, y: y_batch})\n",
Expand Down Expand Up @@ -799,7 +799,7 @@
"with tf.Session() as sess:\n",
" init.run()\n",
" for epoch in range(n_epochs):\n",
" for iteration in range(len(mnist.test.labels)//batch_size):\n",
" for iteration in range(mnist.train.num_examples // batch_size):\n",
" X_batch, y_batch = mnist.train.next_batch(batch_size)\n",
" sess.run(training_op, feed_dict={X: X_batch, y: y_batch})\n",
" acc_train = accuracy.eval(feed_dict={X: X_batch, y: y_batch})\n",
Expand Down

0 comments on commit cbb757f

Please sign in to comment.