Windows下Keras下载数据集路径

先说重点:在C:\Users\你的用户名 下的.keras/datasets/里

官网或者说全网都在说Keras下载路径在

~/.keras/datasets/

然鹅,这是linux或者mac的默认路径,那么Windows呢=-=

我查了一下keras代码,里面写着

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`.

之后嘞,用了这个函数获得“~"路径

os.path.join(os.path.expanduser('~'), '.keras')

那么很简单,我print这个路径在哪就行了

print(os.path.join(os.path.expanduser('~'), '.keras'))

输出:

C:\Users\atlas\.keras

好吧。。。。

其实,最近服务器爆满,所以才想在自己电脑上试试;推荐做DL还是在linux吧。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容