在Python中加载MNIST数据库时出错

时间:2015-09-30 04:18:31

标签: python scikit-learn mnist

我试图使用MNIST手写数字数据库,但下面两行给我错误。我哪里错了?

from sklearn import datasets
dataset = datasets.fetch_mldata('MNIST original')

我得到的错误如下:

Traceback (most recent call last):
  File "E:/HWrecognition/deep-belief-network-gpu-update/kk.py", line 5, in <module>
    dataset = datasets.fetch_mldata('MNIST original')
  File "C:\Python27\lib\site-packages\sklearn\datasets\mldata.py", line 142, in fetch_mldata
    mldata_url = urlopen(urlname)
  File "C:\Python27\lib\urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "C:\Python27\lib\urllib2.py", line 397, in open
    response = meth(req, response)
  File "C:\Python27\lib\urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:\Python27\lib\urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "C:\Python27\lib\urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "C:\Python27\lib\urllib2.py", line 605, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "C:\Python27\lib\urllib2.py", line 391, in open
    response = self._open(req, data)
  File "C:\Python27\lib\urllib2.py", line 409, in _open
    '_open', req)
  File "C:\Python27\lib\urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "C:\Python27\lib\urllib2.py", line 1173, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "C:\Python27\lib\urllib2.py", line 1148, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 10109] getaddrinfo failed>

0 个答案:

没有答案