How to solve the problem that keras cannot be downloaded in loaddata
This article mainly introduces the relevant knowledge of "keras can not download how to solve it in loaddata". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope that this article "how to solve the problem when keras cannot be downloaded in loaddata" can help you solve the problem.
Solution:
Download mnist.npz directly from the Internet and put it locally, such as the root directory of F disk.
Write directly: mnist.load_data ("F:mnist.npz")
It's all right.
Add: solve the problem that imdb.load_data (num_words=10000) cannot download the dataset under Keras
When we follow the code tutorials in deeplearning with python books, we often have the problem of data set download failure.
For example, run the following code (train_data, train_labels), (test_data, test_labels) = imdb.load_data (num_words=10000)
Will go to a website to download the dataset of imdb.npz, and the download is likely to fail, so what should I do?
You can download the imdb.npz dataset on Baidu, store it in a folder, and then change the code as follows:
(train_data, train_labels), (test_data, test_labels) = imdb.load_data (path= "/ home/cc/datasets/imdb.npz", num_words=10000)
Haha, is it easy to solve the problem?
Or put the downloaded imdb.npz file under the .keras / datasets folder in the home directory. In the ubuntu system, the .keras / datasets folder is hidden. Press ctrl+H in the home directory to show the hidden folder. This eliminates the need to modify the code, and. / keras/datasets is the default storage folder for downloading files in the code.
This is the end of the content about "keras can't be downloaded in loaddata". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.