ModuleNotFoundError: No module named 'mnist'
francisalfanta opened this issue · comments
from mnist import MNIST
data = MNIST(data_dir="data/MNIST/")
ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 from mnist import MNIST
2 data = MNIST(data_dir="data/MNIST/")
ModuleNotFoundError: No module named 'mnist'
RTFM!
How this problem was solved?
Read the "Downloading" section in the README file. You need to clone the entire repo to get all the necessary files.
@francisalfanta @ricardobnjunior ri
you have add this snippet of code on top of Hvass Collab's file. It will download some dependencies for the import module:
import os
work_dir = "/content/TensorFlow-Tutorials/"
if os.getcwd() != work_dir:
!git clone https://github.com/Hvass-Labs/TensorFlow-Tutorials
os.chdir(work_dir)
@francisalfanta @ricardobnjunior You need to have "mnist.py", "dataset.py", "download.py", "cache.py" in the same working directory.
For instance:
You can find all the listed python files in the Tensorflow-Master folder, thanks to @Hvass-Labs.