Keras在哪里为MNIST存储下载的数据? [英] Where does Keras store downloaded data for MNIST?

查看:87
本文介绍了Keras在哪里为MNIST存储下载的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行了以下脚本:

https://github.com /antoniosehk/keras-tensorflow-windows-installation/blob/master/examples/mnist_mlp.py

我相信这些行下载了数据.

I believe these lines downloaded the data.

from keras.datasets import mnist    
(x_train, y_train), (x_test, y_test) = mnist.load_data()

我正在Windows 10上运行此脚本.数据存储在哪里?我要清理,因为磁盘空间有限.

I am running this script on Windows 10. Where ist the data being stored? I would like to clean up because my disk space is limited.

推荐答案

您始终可以在github上检查Keras代码.根据您的情况,您需要在此处 get_file 函数: https://github.com/keras-team/keras/blob/e77a4cf3f85b45ad4275dfd661073ace1cc06e5a/keras/utils/data_utils.py#L123

you always can check the Keras code on github. In your case you need the get_file function here: https://github.com/keras-team/keras/blob/e77a4cf3f85b45ad4275dfd661073ace1cc06e5a/keras/utils/data_utils.py#L123

您的问题的答案是:

默认情况下,URL origin中的文件被下载到 将cache_dir ~/.keras放置在cache_subdir datasets中, 并给出文件名fname.文件的最终位置 因此example.txt将是~/.keras/datasets/example.txt.

By default the file at the url origin is downloaded to the cache_dir ~/.keras, placed in the cache_subdir datasets, and given the filename fname. The final location of a file example.txt would therefore be ~/.keras/datasets/example.txt.

这篇关于Keras在哪里为MNIST存储下载的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆