在keras上导入vgg16模型进行数据训练时发现报错如下:
xception: URL fetch failure on https://storage.googleapis.com/tensorflow/keras-applications/vgg16/vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5: None -- [Errno 111] Connection refused
显示无法连接的报错(缺少h5文件),点击对应网址发现网址不可进入。但是按照报错寻找网址下载。
解决方案:
1.到如下网址下载:Release VGG16, VGG19, and ResNet50 · fchollet/deep-learning-models · GitHub
2.将weights参数改为你保存的文件的地址:
(weights=‘h5文件对应地址’),运行无报错!完美解决!
版权声明:本文为博主新手村霸原创文章,版权归属原作者,如果侵权,请联系我们删除!
原文链接:https://blog.csdn.net/weixin_58420301/article/details/123186825