ModuleNotFoundError Traceback (most recent call last) <ipython-input-1-917aabef6fe5> in <module> 1 import numpy as np 2 import tensorflow as tf ----> 3 from tensorflow.examples.tutorials.mnist import input_data 4 5 # TensorFLow includes a data provider for MNIST that we'll use. ModuleNotFoundError: No module named 'tensorflow.examples.tutorials'
The issue might be caused due to a version of tensorflow. Apparently there is a problem with tensorflow v. 2. opening some example. What you could try is the following:
from tensorflow.examples.tutorials.mnist import input_data
import tensorflow_datasets as tf # Construct a tf.data.Dataset dataset = tf.load(name="mnist", split=tf.Split.TRAIN)
Alternatively, you could try reverting to v.1 of tensorflow and see if that raises any issues.