Running the first example on Tensorflow's tutorial results in an exception. Tutorial: https://www.tensorflow.org/get_started/mnist/beginners
The error I am encountering is:
An exception has occurred, use %tb to see the full traceback
I am using Python 3.6 and the latest version of Tensorflow. Can anyone else try running the code and see if a similar error occurs?
The error is produced in ipython (Jupyter), because Tensorflow forces system exit, which ipython doesn't like. See for instance this discussion.
Luckily, system exit is done by
tf.app.run
method, so the solution for you is to inline theFLAGS.data_dir
flag (set the local path to MNIST) and runmain
manually:You can even go on and inline the whole
main
method if you like.