🛠️ Scheduled Maintenance | We’ll be undergoing scheduled maintenance and upgrades between 00:00 PST Jan 26th until 00:00 PST Jan 28th. There may be brief interruption of services in that period. We apologize for the inconvenience.

The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Anybody can ask a question
Anybody can answer
The best answers are voted up and moderated by our team

Import Error in the mnist exercise

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\__init__.py)

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

I use Jupyter Notebook with tenserflow 2.1
1 Answer

365 Team

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.