Keras在哪里为MNIST存储下载的数据? [英] Where does Keras store downloaded data for MNIST?
问题描述
我运行了以下脚本:
我相信这些行下载了数据.
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_subdirdatasets
中, 并给出文件名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_subdirdatasets
, and given the filenamefname
. The final location of a fileexample.txt
would therefore be~/.keras/datasets/example.txt
.
这篇关于Keras在哪里为MNIST存储下载的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!