Skip to content

Commit

Permalink
Little tweaks to beautify code in chapter 14
Browse files Browse the repository at this point in the history
  • Loading branch information
ageron committed Oct 6, 2016
1 parent cbb757f commit 6496cc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 14_recurrent_neural_networks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,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",
" X_batch = X_batch.reshape((-1, n_steps, n_inputs))\n",
" sess.run(training_op, feed_dict={X: X_batch, y: y_batch})\n",
Expand Down Expand Up @@ -1010,7 +1010,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",
" X_batch = X_batch.reshape((-1, n_steps, n_inputs))\n",
" sess.run(training_op, feed_dict={X: X_batch, y: y_batch})\n",
Expand Down Expand Up @@ -1837,7 +1837,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",
" X_batch = X_batch.reshape((batch_size, n_steps, n_inputs))\n",
" sess.run(training_op, feed_dict={X: X_batch, y: y_batch})\n",
Expand Down

0 comments on commit 6496cc6

Please sign in to comment.