Deep learning 即使Keras也在下载VGG16预训练模型。/Keras/models

Deep learning 即使Keras也在下载VGG16预训练模型。/Keras/models,deep-learning,keras,Deep Learning,Keras,我试着运行VGG16 keras脚本。 我得到这个错误: Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels.h5 Traceback (most recent call last): File "test_imagenet.py", line 40, in model = VGG

我试着运行VGG16 keras脚本。 我得到这个错误:

Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels.h5
Traceback (most recent call last):
File "test_imagenet.py", line 40, in
model = VGG16(weights="imagenet")
File "/home/nvidia/deep-learning-models/imagenet-example/vgg16.py", line 143, in VGG16
cache_subdir='models')
File "build/bdist.linux-aarch64/egg/keras/utils/data_utils.py", line 222, in get_file
Exception: URL fetch failure on https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels.h5:
我试图从手动下载并粘贴到
~/.keras/models


但我还是犯了同样的错误。为什么?我不理解错误,因为正确的模型已经在
.keras/models

VGG16
函数中
include\u top
参数的默认值是
True
。这意味着如果你想使用一个全层预训练的VGG网络(带有完全连接的部分),你需要下载
vgg16\u权重\u tf\u dim\u排序\u tf\u kernels.h5
文件,而不是
vgg16\u权重\u tf\u dim\u排序\u tf\u kernels\u notop.h5

这是一个很好的答案。你有什么建议把下载的文件放在哪个目录?我找不到
~/.keras/models
目录。我应该创建一个吗?你能分享你的经验吗?@JoeT.Boka你能找到
~/.keras/keras.json
?不,我没有
~/.keras/keras.json
我找到了
~/.keras/models
目录。这有点混乱,因为目录不在我的Conda环境中。谢谢你的帮助。