Last answered:

01 Apr 2020

Posted on:

31 Mar 2020


Import Error in the mnist exercise

I can´t do the exercise, because I get this error:
ImportError                               Traceback (most recent call last)
<ipython-input-3-38a594be95a7> in <module>
      2 import tensorflow as tf
      3 #from tensorflow.examples.tutorials.mnist import input_data
----> 4 from tensorflow import input_data
      5 # TensorFLow includes a data provider for MNIST that we'll use.
      6 # This function automatically downloads the MNIST dataset to the chosen directory.

ImportError: cannot import name 'input_data' from 'tensorflow' (C:\Users\User\.conda\envs\DanielEnv\lib\site-packages\tensorflow\

ModuleNotFoundError: No module named 'tensorflow.examples.tutorials'

I use Jupyter Notebook with tenserflow 2.1
1 answers ( 0 marked as helpful)
Posted on:

01 Apr 2020


Hi Daniel,
Please note that we have two different courses:
Deep Learning with TensorFlow
Deep Learning with TensorFlow 2
The one you should be referring to is the TF2 (however, you are currently going through the TF1 version of the video and notebooks). You are getting these errors, because the code has been written in TF1.

Submit an answer