In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to solve the problem of mnist dataset". In the daily operation, I believe many people have doubts about how to solve the problem of mnist dataset. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubt of "how to solve the problem of mnist dataset". Next, please follow the editor to study!
Raise IOError, "not a gzip file"
There is an error:
File "tensorflow/models/image/mnist/convolutional.py", line 59, in extract_data bytestream.read (16) File "/ Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py", line 268, in read self._read (readsize) File "/ Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py", line 303 In _ read self._read_gzip_header () File "/ Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py", line 197, in _ read_gzip_header raise IOError, 'Not a gzipped file'
Solution:
The code attempts to download the data file from the MNIST website, and assuming that the file exists locally on your system, the file has been downloaded correctly. You may have a corrupted file, in which case it may be helpful to delete it and try again. Otherwise, try to get the data directly through the browser.
From tensorflow.examples.tutorials.mnist import input_data will be removed in future versions of the workaround
MNIST datasets are often used when learning neural networks, and warnings sometimes appear when using Tensorflow to import datasets using the following methods
From tensorflow.examples.tutorials.mnist import input_dataimport tensorflow as tfmnist = input_data.read_data_sets ("MNIST_data/", one_hot=True)
The workaround is to change it to the following code
From tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_setsimport tensorflow as tfmnist = read_data_sets ("MNIST_data/", one_hot=True)
Successfully import the result
Extracting MNIST_data/train-images-idx3-ubyte.gzExtracting MNIST_data/train-labels-idx1-ubyte.gzExtracting MNIST_data/t10k-images-idx3-ubyte.gzExtracting MNIST_data/t10k-labels-idx1-ubyte.gz at this point, the study on "how to solve the problem of mnist dataset" is over. I hope to be able to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.