在构建Inception V3、VGG19等网络架构的时候,
from keras
.applications
import inception_v3
K
.set_learning_phase
(0)//因为我们不需要训练模型
model
=inception_v3
.InceptionV3
(weights
='imagenet',include_top
=False)
运行这段代码报错:
Downloading data
from https
://github
.com
/fchollet
/deep
-learning
-models
/releases
/download
/v0
.1/vgg19_weights_tf_dim_ordering_tf_kernels_notop
.h5
1097728/80134624 [..............................] - ETA
: 28780s
.
.
.
.
.
.
.
.
.
.
ConnectionResetError
: [WinError
10054] 远程主机强迫关闭了一个现有的连接。
这种情况主要是因为链接Github下载的时候网速太慢,所以我们可以自行下载后放入C:\Users\自己的用户名.keras\models