ゼロから始めるDeep Learningを用いて機械学習を学んでいる者です。
いまmnistをつかった文字認識の部分を勉強しているのですが、エラーが出て困っています。
(サンプルプログラムファイルはダウンロード済みです)
やってみたこと
・datasetファイルを書いているプログラムのディレクトリと同じ場所に移した
・mnist.pyを実行して、4つのファイルを生成した
出たエラー
"C:\Users\keigo\Documents\python\Deep Learning\venv\Scripts\python.exe" "C:/Users/keigo/Documents/python/Deep Learning/3.6.1.py"
Traceback (most recent call last):
Converting train-images-idx3-ubyte.gz to NumPy Array ...
File "C:/Users/keigo/Documents/python/Deep Learning/3.6.1.py", line 6, in <module>
load_mnist(flatten=True, normalize=False)
File "C:\Users\keigo\Documents\python\Deep Learning\dataset\mnist.py", line 106, in load_mnist
init_mnist()
File "C:\Users\keigo\Documents\python\Deep Learning\dataset\mnist.py", line 76, in init_mnist
dataset = _convert_numpy()
File "C:\Users\keigo\Documents\python\Deep Learning\dataset\mnist.py", line 67, in _convert_numpy
dataset['train_img'] = _load_img(key_file['train_img'])
File "C:\Users\keigo\Documents\python\Deep Learning\dataset\mnist.py", line 59, in _load_img
data = np.frombuffer(f.read(), np.uint8, offset=16)
File "C:\Users\keigo\AppData\Local\Programs\Python\Python36\lib\gzip.py", line 276, in read
return self._buffer.read(size)
File "C:\Users\keigo\AppData\Local\Programs\Python\Python36\lib\gzip.py", line 482, in read
raise EOFError("Compressed file ended before the "
EOFError: Compressed file ended before the end-of-stream marker was reached
Process finished with exit code 1
google班訳に突っ込んでもよくわからなかったので、どなたか解決方法を教えてください。
あと、init.pyというファイルのソースを見たのですが、何も書かれていませんでした。これは大丈夫なのでしょうか。
ご回答よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/08/04 04:20
2018/08/04 04:28
2018/08/04 05:37
2018/08/04 11:19
2018/08/04 13:52
2018/08/04 23:11