Skip to content

Commit 31aa360

Browse files
ckirksey3aymericdamien
authored andcommitted
make print statements Python 3 compatible (aymericdamien#149)
1 parent 8ca1338 commit 31aa360

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

notebooks/3_NeuralNetworks/convolutional_network.ipynb

+5-5
Original file line numberDiff line numberDiff line change
@@ -338,17 +338,17 @@
338338
" loss, acc = sess.run([cost, accuracy], feed_dict={x: batch_x,\n",
339339
" y: batch_y,\n",
340340
" keep_prob: 1.})\n",
341-
" print \"Iter \" + str(step*batch_size) + \", Minibatch Loss= \" + \\\n",
341+
" print(\"Iter \" + str(step*batch_size) + \", Minibatch Loss= \" + \\\n",
342342
" \"{:.6f}\".format(loss) + \", Training Accuracy= \" + \\\n",
343-
" \"{:.5f}\".format(acc)\n",
343+
" \"{:.5f}\".format(acc))\n",
344344
" step += 1\n",
345-
" print \"Optimization Finished!\"\n",
345+
" print(\"Optimization Finished!\")\n",
346346
"\n",
347347
" # Calculate accuracy for 256 mnist test images\n",
348-
" print \"Testing Accuracy:\", \\\n",
348+
" print(\"Testing Accuracy:\", \\\n",
349349
" sess.run(accuracy, feed_dict={x: mnist.test.images[:256],\n",
350350
" y: mnist.test.labels[:256],\n",
351-
" keep_prob: 1.})"
351+
" keep_prob: 1.}))"
352352
]
353353
},
354354
{

0 commit comments

Comments
 (0)