官方下载地址
https://github.com/fchollet/deep-learning-models/releases
网盘下载地址
链接:https://pan.baidu.com/s/1uh4ta7_J9NKYMW-PXCyCyQ 密码: h3sw
其中包含
resnet50_weights_tf_dim_ordering_tf_kernels.h5 98.1M
resnet50_weights_tf_dim_ordering_tf_kernels_notop.h5 90.3M
xception_weights_tf_dim_ordering_tf_kernels.h5 87.6M
xception_weights_tf_dim_ordering_tf_kernels_notop.h5 79.8M
inception_v3_weights_tf_dim_ordering_tf_kernels_notop_update.h5 83.8M
inception_v3_weights_tf_dim_ordering_tf_kernels_notop.h5 82.9M
vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5 56.2M
inception_v3_weights_tf_dim_ordering_tf_kernels_update.h5 91.7M
vgg16_weights_tf_dim_ordering_tf_kernels.h5 527.8M
vgg19_weights_tf_dim_ordering_tf_kernels_notop.h5 76.4M
inception_v3_weights_tf_dim_ordering_tf_kernels.h5 90.7M
vgg19_weights_tf_dim_ordering_tf_kernels.h5
链接:https://pan.baidu.com/s/1uh4ta7_J9NKYMW-PXCyCyQ 密码: h3sw
加载文件
Linux: 将下载好的*.h5文件下载到用户目录下的~/.keras/models
Windows: 在电脑的地址栏中输入%userprofile%,将下载好的*.h5文件放入.keras/models文件夹下
模型的预训练权重在载入模型时自动载入。就可以愉快地玩耍了。
为了避免c盘占用过大,使用相对路径加载也可以
path='./[权重文件存放路径]/vgg16_weights_tf_dim_ordering_tf_kernels.h5'
vgg16 = VGG16(weights=path, include_top=True)
vgg16.summary()

说明:
上面的tf代表使用tensorflow作为后端,如果使用theano作为后端的则需要下载_th_版本的。
keras中文文档对此的说明:
http://keras-cn.readthedocs.io/en/latest/backend/