mnist = input_data.read_data_sets("MNIST_data", one_hot = True)
を実行すると、次のエラーが発生します。私は手動でファイルを抽出し、MNIST_data
ディレクトリに配置する場合 EOFError:ストリーム終了マーカーに達する前に圧縮ファイルが終了しました - MNISTデータセット
はさえ、プログラムがまだ抽出されたファイルを使用する代わりに、ファイルをダウンロードしようとしています。EOFError: Compressed file ended before the end-of-stream marker was reached
手動でWinZipを使用してファイルを抽出すると、ファイルが壊れているとWinZipから通知されます。
どのようにこの問題を解決できますか?
データセットを読み込むこともできません。プログラム自体をデバッグする必要があります。助けてください。
Tensorflowがインストールされているため、Tensorflowの例はありません。そこで私はinput_data
ファイルを取得するためにGitHubに行って、main.py
と同じディレクトリに保存しました。エラーは.gzファイルに関するものです。プログラムはそれを抽出できませんでした。
runfile('C:/Users/Nikhil/Desktop/Tensor Flow/tensf.py', wdir='C:/Users/Nikhil/Desktop/Tensor Flow') Reloaded modules: input_data Extracting MNIST_data/train-images-idx3-ubyte.gz C:\Users\Nikhil\Anaconda3\lib\gzip.py:274: VisibleDeprecationWarning: converting an array with ndim > 0 to an index will result in an error in the future return self._buffer.read(size) Traceback (most recent call last):
File "", line 1, in runfile('C:/Users/Nikhil/Desktop/Tensor Flow/tensf.py', wdir='C:/Users/Nikhil/Desktop/Tensor Flow')
File "C:\Users\Nikhil\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile execfile(filename, namespace)
File "C:\Users\Nikhil\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/Nikhil/Desktop/Tensor Flow/tensf.py", line 26, in mnist = input_data.read_data_sets("MNIST_data/", one_hot = True)
File "C:\Users\Nikhil\Desktop\Tensor Flow\input_data.py", line 181, in read_data_sets train_images = extract_images(local_file)
File "C:\Users\Nikhil\Desktop\Tensor Flow\input_data.py", line 60, in extract_images buf = bytestream.read(rows * cols * num_images)
File "C:\Users\Nikhil\Anaconda3\lib\gzip.py", line 274, in read return self._buffer.read(size)
File "C:\Users\Nikhil\Anaconda3\lib_compression.py", line 68, in readinto data = self.read(len(byte_view))
File "C:\Users\Nikhil\Anaconda3\lib\gzip.py", line 480, in read raise EOFError("Compressed file ended before the "
EOFError: Compressed file ended before the end-of-stream marker was reached
このエラーは解決しましたか?私も同様のエラーが発生しています。 – Moondra