martin-gorner / tensorflow-mnist-tutorial

Sample code for "Tensorflow and deep learning, without a PhD" presentation and code lab.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

raise err IOError: [Errno socket error] [Errno 110] Connection timed out

EllieElliegogo opened this issue · comments

I came across this error when i tried this the second time
ymd@ymd:~/tensorflow-mnist-tutorial$ python mnist_1.0_softmax.py
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally
Traceback (most recent call last):
File "mnist_1.0_softmax.py", line 39, in
mnist = read_data_sets("data", one_hot=True, reshape=False, validation_size=0)
File "/home/ymd/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py", line 211, in read_data_sets
SOURCE_URL + TRAIN_IMAGES)
File "/home/ymd/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/base.py", line 208, in maybe_download
temp_file_name, _ = urlretrieve_with_retry(source_url)
File "/home/ymd/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/base.py", line 165, in wrapped_fn
return fn(*args, **kwargs)
File "/home/ymd/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/base.py", line 190, in urlretrieve_with_retry
return urllib.request.urlretrieve(url, filename)
File "/home/ymd/anaconda2/lib/python2.7/urllib.py", line 98, in urlretrieve
return opener.retrieve(url, filename, reporthook, data)
File "/home/ymd/anaconda2/lib/python2.7/urllib.py", line 245, in retrieve
fp = self.open(url, data)
File "/home/ymd/anaconda2/lib/python2.7/urllib.py", line 213, in open
return getattr(self, name)(url)
File "/home/ymd/anaconda2/lib/python2.7/urllib.py", line 350, in open_http
h.endheaders(data)
File "/home/ymd/anaconda2/lib/python2.7/httplib.py", line 1038, in endheaders
self._send_output(message_body)
File "/home/ymd/anaconda2/lib/python2.7/httplib.py", line 882, in _send_output
self.send(msg)
File "/home/ymd/anaconda2/lib/python2.7/httplib.py", line 844, in send
self.connect()
File "/home/ymd/anaconda2/lib/python2.7/httplib.py", line 821, in connect
self.timeout, self.source_address)
File "/home/ymd/anaconda2/lib/python2.7/socket.py", line 575, in create_connection
raise err
IOError: [Errno socket error] [Errno 110] Connection timed out

i'm a fresh man on python and tensorflow,and i will be so pleased if you could tell me how to make it right.

I found the answer,i can't download mnist data from website.

indeed, the site seems to be down again.
You can download the file manually from here.
When you please the files in to a folder named "data", the script will not try to download them.