Hvass-Labs / TensorFlow-Tutorials

TensorFlow Tutorials with YouTube Videos
MIT License
9.28k stars 4.19k forks source link

ModuleNotFoundError: No module named 'mnist' #80

Closed francisalfanta closed 6 years ago

francisalfanta commented 6 years ago

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'
Hvass-Labs commented 6 years ago

RTFM!

ricardobnjunior commented 6 years ago

How this problem was solved?

Hvass-Labs commented 6 years ago

Read the "Downloading" section in the README file. You need to clone the entire repo to get all the necessary files.

bobvo23 commented 5 years ago

@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)

ahx-code commented 5 years ago

@francisalfanta @ricardobnjunior You need to have "mnist.py", "dataset.py", "download.py", "cache.py" in the same working directory.

For instance:

screen shot 2019-01-03 at 12 33 52

You can find all the listed python files in the Tensorflow-Master folder, thanks to @Hvass-Labs.