Minor improvement in chapter 10
parent
9b5ffe0472
commit
0d08368095
|
@ -430,7 +430,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",
|
||||
|
@ -576,7 +576,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",
|
||||
|
|
Loading…
Reference in New Issue