美文网首页
Windows下Keras下载数据集路径

Windows下Keras下载数据集路径

作者: 七比比 | 来源:发表于2019-03-26 12:05 被阅读0次

先说重点:在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吧。

相关文章

网友评论

      本文标题:Windows下Keras下载数据集路径

      本文链接:https://www.haomeiwen.com/subject/uqlgvqtx.html