chiphuyen / stanford-tensorflow-tutorials

This repository contains code examples for the Stanford's course: TensorFlow for Deep Learning Research.
http://cs20.stanford.edu
MIT License
10.32k stars 4.32k forks source link

03_logreg_starter.py could not download mnist (404 NOT found) #121

Open jmzhang18 opened 6 years ago

jmzhang18 commented 6 years ago

I used Jupyter-Notebook to download mnist dataset with following code: mnist_folder = 'data/mnist' utils.download_mnist(mnist_folder)

This will cause 404 Not found issue.

In utils.py: download_mnist(path):

change: url = 'http://yann.lecun.com/exdb/mnist'

to

url = 'http://yann.lecun.com/exdb/mnist/'
just add "/" at the end, will solve my problem

minhchan11 commented 6 years ago

For Windows, you might want to add this: download_url = os.path.join(url, filename).replace('\','/')

due to the os.path.join issues

const7 commented 5 years ago

For Windows, you might want to add this: download_url = os.path.join(url, filename).replace('\','/')

due to the os.path.join issues

\ is an escape character so it's better to use: download_url = os.path.join(url, filename).replace('\\', '/')