本帖最后由 tobot 于 2022-12-7 08:03 编辑
在上一篇(https://bbs.eeworld.com.cn/thread-1227155-1-1.html)里面,我们已经介绍了,我们有一个训练集,有一个测试集(验证集和测试集合并)。训练集是用来运行学习算法的,多次迭代;训练好的模型是否可用,还得看在测试集中的表现。
目前我们使用了三个网络来对同一组数据进行训练:
Train0是自己搭建的分层网络,Train1是基于InceptionV3网络修改而成的,Train2是基于ResNet50网络修改的。每个网络都经过20轮迭代,记录每次迭代的history.history值,并使用matplotlib将其画成曲线图,用来分析趋势,其中重要值有:
loss:训练集损失值
accuracy:训练集准确率
val_loss:测试集损失值
val_accruacy:测试集准确率
从名字就可以知道,其中loss和accuracy针对的是训练集,val_loss和val_accuracy针对的是测试集(val为validation的缩写)。
一般是准确率越来越高,丢失率越来越低(当然如果数据集质量太差,loss还可能增加),根据网上大多数的说法:
1)train loss 不断下降,test loss不断下降,说明网络仍在学习;(最好的)
2)train loss 不断下降,test loss趋于不变,说明网络过拟合;(max pool或者正则化)
3)train loss 趋于不变,test loss不断下降,说明数据集有问题;(检查dataset)
4)train loss 趋于不变,test loss趋于不变,说明学习遇到瓶颈,需要减小学习率或批量数目;(减少学习率)
5)train loss 不断上升,test loss不断上升,说明网络结构设计不当,训练超参数设置不当,数据集经过清洗等问题。(最不好的情况)这种情况,loss在下降,val_loss趋于不变,说明网络过拟合状态。
一般来说,训练的准确率应该是大于验证的准确率,但在某些情况下也有可能出现validation accuracy大于train accuracy的现象:
1)validation的样本数量一般远小于training的
2)使用已经训练了一个epoch的model进行测试
3)data augmentation把训练集变得丰富,制造数据的多样性和学习的困难来让network更robust(比如旋转,随机crop,scale),但是val和test的时候一般是不对数据进行data augmentation的
4)各种正则化,dropout在训练集上使用,却不会在验证集上使用,导致训练集的 loss 偏大
采用分类的图片一共有三类:
1、恐龙(train 213张,test 58张)
2、花朵(trian 207张,test 75张)
3、热狗(train 164张,test 70张)
记录训练所需时间、训练参数数量、训练效果曲线如下:
自建网络
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
conv2d (Conv2D) (None, 224, 224, 32) 896
max_pooling2d (MaxPooling2D (None, 112, 112, 32) 0
)
conv2d_1 (Conv2D) (None, 110, 110, 64) 18496
max_pooling2d_1 (MaxPooling (None, 55, 55, 64) 0
2D)
conv2d_2 (Conv2D) (None, 53, 53, 64) 36928
dropout (Dropout) (None, 53, 53, 64) 0
flatten (Flatten) (None, 179776) 0
dense (Dense) (None, 64) 11505728
dropout_1 (Dropout) (None, 64) 0
dense_1 (Dense) (None, 3) 195
=================================================================
Total params: 11,562,243
Trainable params: 11,562,243
Non-trainable params: 0
_________________________________________________________________
Cost time: 9345.8612027
基于InceptionV3网络
__________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
==================================================================================================
input_1 (InputLayer) [(None, 224, 224, 3 0 []
)]
conv2d (Conv2D) (None, 111, 111, 32 864 ['input_1[0][0]']
)
batch_normalization (BatchNorm (None, 111, 111, 32 96 ['conv2d[0][0]']
alization) )
activation (Activation) (None, 111, 111, 32 0 ['batch_normalization[0][0]']
)
conv2d_1 (Conv2D) (None, 109, 109, 32 9216 ['activation[0][0]']
)
batch_normalization_1 (BatchNo (None, 109, 109, 32 96 ['conv2d_1[0][0]']
rmalization) )
activation_1 (Activation) (None, 109, 109, 32 0 ['batch_normalization_1[0][0]']
)
conv2d_2 (Conv2D) (None, 109, 109, 64 18432 ['activation_1[0][0]']
)
batch_normalization_2 (BatchNo (None, 109, 109, 64 192 ['conv2d_2[0][0]']
rmalization) )
activation_2 (Activation) (None, 109, 109, 64 0 ['batch_normalization_2[0][0]']
)
max_pooling2d (MaxPooling2D) (None, 54, 54, 64) 0 ['activation_2[0][0]']
conv2d_3 (Conv2D) (None, 54, 54, 80) 5120 ['max_pooling2d[0][0]']
batch_normalization_3 (BatchNo (None, 54, 54, 80) 240 ['conv2d_3[0][0]']
rmalization)
activation_3 (Activation) (None, 54, 54, 80) 0 ['batch_normalization_3[0][0]']
conv2d_4 (Conv2D) (None, 52, 52, 192) 138240 ['activation_3[0][0]']
batch_normalization_4 (BatchNo (None, 52, 52, 192) 576 ['conv2d_4[0][0]']
rmalization)
activation_4 (Activation) (None, 52, 52, 192) 0 ['batch_normalization_4[0][0]']
max_pooling2d_1 (MaxPooling2D) (None, 25, 25, 192) 0 ['activation_4[0][0]']
conv2d_8 (Conv2D) (None, 25, 25, 64) 12288 ['max_pooling2d_1[0][0]']
batch_normalization_8 (BatchNo (None, 25, 25, 64) 192 ['conv2d_8[0][0]']
rmalization)
activation_8 (Activation) (None, 25, 25, 64) 0 ['batch_normalization_8[0][0]']
conv2d_6 (Conv2D) (None, 25, 25, 48) 9216 ['max_pooling2d_1[0][0]']
conv2d_9 (Conv2D) (None, 25, 25, 96) 55296 ['activation_8[0][0]']
batch_normalization_6 (BatchNo (None, 25, 25, 48) 144 ['conv2d_6[0][0]']
rmalization)
batch_normalization_9 (BatchNo (None, 25, 25, 96) 288 ['conv2d_9[0][0]']
rmalization)
activation_6 (Activation) (None, 25, 25, 48) 0 ['batch_normalization_6[0][0]']
activation_9 (Activation) (None, 25, 25, 96) 0 ['batch_normalization_9[0][0]']
average_pooling2d (AveragePool (None, 25, 25, 192) 0 ['max_pooling2d_1[0][0]']
ing2D)
conv2d_5 (Conv2D) (None, 25, 25, 64) 12288 ['max_pooling2d_1[0][0]']
conv2d_7 (Conv2D) (None, 25, 25, 64) 76800 ['activation_6[0][0]']
conv2d_10 (Conv2D) (None, 25, 25, 96) 82944 ['activation_9[0][0]']
conv2d_11 (Conv2D) (None, 25, 25, 32) 6144 ['average_pooling2d[0][0]']
batch_normalization_5 (BatchNo (None, 25, 25, 64) 192 ['conv2d_5[0][0]']
rmalization)
batch_normalization_7 (BatchNo (None, 25, 25, 64) 192 ['conv2d_7[0][0]']
rmalization)
batch_normalization_10 (BatchN (None, 25, 25, 96) 288 ['conv2d_10[0][0]']
ormalization)
batch_normalization_11 (BatchN (None, 25, 25, 32) 96 ['conv2d_11[0][0]']
ormalization)
activation_5 (Activation) (None, 25, 25, 64) 0 ['batch_normalization_5[0][0]']
activation_7 (Activation) (None, 25, 25, 64) 0 ['batch_normalization_7[0][0]']
activation_10 (Activation) (None, 25, 25, 96) 0 ['batch_normalization_10[0][0]']
activation_11 (Activation) (None, 25, 25, 32) 0 ['batch_normalization_11[0][0]']
mixed0 (Concatenate) (None, 25, 25, 256) 0 ['activation_5[0][0]',
'activation_7[0][0]',
'activation_10[0][0]',
'activation_11[0][0]']
conv2d_15 (Conv2D) (None, 25, 25, 64) 16384 ['mixed0[0][0]']
batch_normalization_15 (BatchN (None, 25, 25, 64) 192 ['conv2d_15[0][0]']
ormalization)
activation_15 (Activation) (None, 25, 25, 64) 0 ['batch_normalization_15[0][0]']
conv2d_13 (Conv2D) (None, 25, 25, 48) 12288 ['mixed0[0][0]']
conv2d_16 (Conv2D) (None, 25, 25, 96) 55296 ['activation_15[0][0]']
batch_normalization_13 (BatchN (None, 25, 25, 48) 144 ['conv2d_13[0][0]']
ormalization)
batch_normalization_16 (BatchN (None, 25, 25, 96) 288 ['conv2d_16[0][0]']
ormalization)
activation_13 (Activation) (None, 25, 25, 48) 0 ['batch_normalization_13[0][0]']
activation_16 (Activation) (None, 25, 25, 96) 0 ['batch_normalization_16[0][0]']
average_pooling2d_1 (AveragePo (None, 25, 25, 256) 0 ['mixed0[0][0]']
oling2D)
conv2d_12 (Conv2D) (None, 25, 25, 64) 16384 ['mixed0[0][0]']
conv2d_14 (Conv2D) (None, 25, 25, 64) 76800 ['activation_13[0][0]']
conv2d_17 (Conv2D) (None, 25, 25, 96) 82944 ['activation_16[0][0]']
conv2d_18 (Conv2D) (None, 25, 25, 64) 16384 ['average_pooling2d_1[0][0]']
batch_normalization_12 (BatchN (None, 25, 25, 64) 192 ['conv2d_12[0][0]']
ormalization)
batch_normalization_14 (BatchN (None, 25, 25, 64) 192 ['conv2d_14[0][0]']
ormalization)
batch_normalization_17 (BatchN (None, 25, 25, 96) 288 ['conv2d_17[0][0]']
ormalization)
batch_normalization_18 (BatchN (None, 25, 25, 64) 192 ['conv2d_18[0][0]']
ormalization)
activation_12 (Activation) (None, 25, 25, 64) 0 ['batch_normalization_12[0][0]']
activation_14 (Activation) (None, 25, 25, 64) 0 ['batch_normalization_14[0][0]']
activation_17 (Activation) (None, 25, 25, 96) 0 ['batch_normalization_17[0][0]']
activation_18 (Activation) (None, 25, 25, 64) 0 ['batch_normalization_18[0][0]']
mixed1 (Concatenate) (None, 25, 25, 288) 0 ['activation_12[0][0]',
'activation_14[0][0]',
'activation_17[0][0]',
'activation_18[0][0]']
conv2d_22 (Conv2D) (None, 25, 25, 64) 18432 ['mixed1[0][0]']
batch_normalization_22 (BatchN (None, 25, 25, 64) 192 ['conv2d_22[0][0]']
ormalization)
activation_22 (Activation) (None, 25, 25, 64) 0 ['batch_normalization_22[0][0]']
conv2d_20 (Conv2D) (None, 25, 25, 48) 13824 ['mixed1[0][0]']
conv2d_23 (Conv2D) (None, 25, 25, 96) 55296 ['activation_22[0][0]']
batch_normalization_20 (BatchN (None, 25, 25, 48) 144 ['conv2d_20[0][0]']
ormalization)
batch_normalization_23 (BatchN (None, 25, 25, 96) 288 ['conv2d_23[0][0]']
ormalization)
activation_20 (Activation) (None, 25, 25, 48) 0 ['batch_normalization_20[0][0]']
activation_23 (Activation) (None, 25, 25, 96) 0 ['batch_normalization_23[0][0]']
average_pooling2d_2 (AveragePo (None, 25, 25, 288) 0 ['mixed1[0][0]']
oling2D)
conv2d_19 (Conv2D) (None, 25, 25, 64) 18432 ['mixed1[0][0]']
conv2d_21 (Conv2D) (None, 25, 25, 64) 76800 ['activation_20[0][0]']
conv2d_24 (Conv2D) (None, 25, 25, 96) 82944 ['activation_23[0][0]']
conv2d_25 (Conv2D) (None, 25, 25, 64) 18432 ['average_pooling2d_2[0][0]']
batch_normalization_19 (BatchN (None, 25, 25, 64) 192 ['conv2d_19[0][0]']
ormalization)
batch_normalization_21 (BatchN (None, 25, 25, 64) 192 ['conv2d_21[0][0]']
ormalization)
batch_normalization_24 (BatchN (None, 25, 25, 96) 288 ['conv2d_24[0][0]']
ormalization)
batch_normalization_25 (BatchN (None, 25, 25, 64) 192 ['conv2d_25[0][0]']
ormalization)
activation_19 (Activation) (None, 25, 25, 64) 0 ['batch_normalization_19[0][0]']
activation_21 (Activation) (None, 25, 25, 64) 0 ['batch_normalization_21[0][0]']
activation_24 (Activation) (None, 25, 25, 96) 0 ['batch_normalization_24[0][0]']
activation_25 (Activation) (None, 25, 25, 64) 0 ['batch_normalization_25[0][0]']
mixed2 (Concatenate) (None, 25, 25, 288) 0 ['activation_19[0][0]',
'activation_21[0][0]',
'activation_24[0][0]',
'activation_25[0][0]']
conv2d_27 (Conv2D) (None, 25, 25, 64) 18432 ['mixed2[0][0]']
batch_normalization_27 (BatchN (None, 25, 25, 64) 192 ['conv2d_27[0][0]']
ormalization)
activation_27 (Activation) (None, 25, 25, 64) 0 ['batch_normalization_27[0][0]']
conv2d_28 (Conv2D) (None, 25, 25, 96) 55296 ['activation_27[0][0]']
batch_normalization_28 (BatchN (None, 25, 25, 96) 288 ['conv2d_28[0][0]']
ormalization)
activation_28 (Activation) (None, 25, 25, 96) 0 ['batch_normalization_28[0][0]']
conv2d_26 (Conv2D) (None, 12, 12, 384) 995328 ['mixed2[0][0]']
conv2d_29 (Conv2D) (None, 12, 12, 96) 82944 ['activation_28[0][0]']
batch_normalization_26 (BatchN (None, 12, 12, 384) 1152 ['conv2d_26[0][0]']
ormalization)
batch_normalization_29 (BatchN (None, 12, 12, 96) 288 ['conv2d_29[0][0]']
ormalization)
activation_26 (Activation) (None, 12, 12, 384) 0 ['batch_normalization_26[0][0]']
activation_29 (Activation) (None, 12, 12, 96) 0 ['batch_normalization_29[0][0]']
max_pooling2d_2 (MaxPooling2D) (None, 12, 12, 288) 0 ['mixed2[0][0]']
mixed3 (Concatenate) (None, 12, 12, 768) 0 ['activation_26[0][0]',
'activation_29[0][0]',
'max_pooling2d_2[0][0]']
conv2d_34 (Conv2D) (None, 12, 12, 128) 98304 ['mixed3[0][0]']
batch_normalization_34 (BatchN (None, 12, 12, 128) 384 ['conv2d_34[0][0]']
ormalization)
activation_34 (Activation) (None, 12, 12, 128) 0 ['batch_normalization_34[0][0]']
conv2d_35 (Conv2D) (None, 12, 12, 128) 114688 ['activation_34[0][0]']
batch_normalization_35 (BatchN (None, 12, 12, 128) 384 ['conv2d_35[0][0]']
ormalization)
activation_35 (Activation) (None, 12, 12, 128) 0 ['batch_normalization_35[0][0]']
conv2d_31 (Conv2D) (None, 12, 12, 128) 98304 ['mixed3[0][0]']
conv2d_36 (Conv2D) (None, 12, 12, 128) 114688 ['activation_35[0][0]']
batch_normalization_31 (BatchN (None, 12, 12, 128) 384 ['conv2d_31[0][0]']
ormalization)
batch_normalization_36 (BatchN (None, 12, 12, 128) 384 ['conv2d_36[0][0]']
ormalization)
activation_31 (Activation) (None, 12, 12, 128) 0 ['batch_normalization_31[0][0]']
activation_36 (Activation) (None, 12, 12, 128) 0 ['batch_normalization_36[0][0]']
conv2d_32 (Conv2D) (None, 12, 12, 128) 114688 ['activation_31[0][0]']
conv2d_37 (Conv2D) (None, 12, 12, 128) 114688 ['activation_36[0][0]']
batch_normalization_32 (BatchN (None, 12, 12, 128) 384 ['conv2d_32[0][0]']
ormalization)
batch_normalization_37 (BatchN (None, 12, 12, 128) 384 ['conv2d_37[0][0]']
ormalization)
activation_32 (Activation) (None, 12, 12, 128) 0 ['batch_normalization_32[0][0]']
activation_37 (Activation) (None, 12, 12, 128) 0 ['batch_normalization_37[0][0]']
average_pooling2d_3 (AveragePo (None, 12, 12, 768) 0 ['mixed3[0][0]']
oling2D)
conv2d_30 (Conv2D) (None, 12, 12, 192) 147456 ['mixed3[0][0]']
conv2d_33 (Conv2D) (None, 12, 12, 192) 172032 ['activation_32[0][0]']
conv2d_38 (Conv2D) (None, 12, 12, 192) 172032 ['activation_37[0][0]']
conv2d_39 (Conv2D) (None, 12, 12, 192) 147456 ['average_pooling2d_3[0][0]']
batch_normalization_30 (BatchN (None, 12, 12, 192) 576 ['conv2d_30[0][0]']
ormalization)
batch_normalization_33 (BatchN (None, 12, 12, 192) 576 ['conv2d_33[0][0]']
ormalization)
batch_normalization_38 (BatchN (None, 12, 12, 192) 576 ['conv2d_38[0][0]']
ormalization)
batch_normalization_39 (BatchN (None, 12, 12, 192) 576 ['conv2d_39[0][0]']
ormalization)
activation_30 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_30[0][0]']
activation_33 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_33[0][0]']
activation_38 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_38[0][0]']
activation_39 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_39[0][0]']
mixed4 (Concatenate) (None, 12, 12, 768) 0 ['activation_30[0][0]',
'activation_33[0][0]',
'activation_38[0][0]',
'activation_39[0][0]']
conv2d_44 (Conv2D) (None, 12, 12, 160) 122880 ['mixed4[0][0]']
batch_normalization_44 (BatchN (None, 12, 12, 160) 480 ['conv2d_44[0][0]']
ormalization)
activation_44 (Activation) (None, 12, 12, 160) 0 ['batch_normalization_44[0][0]']
conv2d_45 (Conv2D) (None, 12, 12, 160) 179200 ['activation_44[0][0]']
batch_normalization_45 (BatchN (None, 12, 12, 160) 480 ['conv2d_45[0][0]']
ormalization)
activation_45 (Activation) (None, 12, 12, 160) 0 ['batch_normalization_45[0][0]']
conv2d_41 (Conv2D) (None, 12, 12, 160) 122880 ['mixed4[0][0]']
conv2d_46 (Conv2D) (None, 12, 12, 160) 179200 ['activation_45[0][0]']
batch_normalization_41 (BatchN (None, 12, 12, 160) 480 ['conv2d_41[0][0]']
ormalization)
batch_normalization_46 (BatchN (None, 12, 12, 160) 480 ['conv2d_46[0][0]']
ormalization)
activation_41 (Activation) (None, 12, 12, 160) 0 ['batch_normalization_41[0][0]']
activation_46 (Activation) (None, 12, 12, 160) 0 ['batch_normalization_46[0][0]']
conv2d_42 (Conv2D) (None, 12, 12, 160) 179200 ['activation_41[0][0]']
conv2d_47 (Conv2D) (None, 12, 12, 160) 179200 ['activation_46[0][0]']
batch_normalization_42 (BatchN (None, 12, 12, 160) 480 ['conv2d_42[0][0]']
ormalization)
batch_normalization_47 (BatchN (None, 12, 12, 160) 480 ['conv2d_47[0][0]']
ormalization)
activation_42 (Activation) (None, 12, 12, 160) 0 ['batch_normalization_42[0][0]']
activation_47 (Activation) (None, 12, 12, 160) 0 ['batch_normalization_47[0][0]']
average_pooling2d_4 (AveragePo (None, 12, 12, 768) 0 ['mixed4[0][0]']
oling2D)
conv2d_40 (Conv2D) (None, 12, 12, 192) 147456 ['mixed4[0][0]']
conv2d_43 (Conv2D) (None, 12, 12, 192) 215040 ['activation_42[0][0]']
conv2d_48 (Conv2D) (None, 12, 12, 192) 215040 ['activation_47[0][0]']
conv2d_49 (Conv2D) (None, 12, 12, 192) 147456 ['average_pooling2d_4[0][0]']
batch_normalization_40 (BatchN (None, 12, 12, 192) 576 ['conv2d_40[0][0]']
ormalization)
batch_normalization_43 (BatchN (None, 12, 12, 192) 576 ['conv2d_43[0][0]']
ormalization)
batch_normalization_48 (BatchN (None, 12, 12, 192) 576 ['conv2d_48[0][0]']
ormalization)
batch_normalization_49 (BatchN (None, 12, 12, 192) 576 ['conv2d_49[0][0]']
ormalization)
activation_40 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_40[0][0]']
activation_43 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_43[0][0]']
activation_48 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_48[0][0]']
activation_49 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_49[0][0]']
mixed5 (Concatenate) (None, 12, 12, 768) 0 ['activation_40[0][0]',
'activation_43[0][0]',
'activation_48[0][0]',
'activation_49[0][0]']
conv2d_54 (Conv2D) (None, 12, 12, 160) 122880 ['mixed5[0][0]']
batch_normalization_54 (BatchN (None, 12, 12, 160) 480 ['conv2d_54[0][0]']
ormalization)
activation_54 (Activation) (None, 12, 12, 160) 0 ['batch_normalization_54[0][0]']
conv2d_55 (Conv2D) (None, 12, 12, 160) 179200 ['activation_54[0][0]']
batch_normalization_55 (BatchN (None, 12, 12, 160) 480 ['conv2d_55[0][0]']
ormalization)
activation_55 (Activation) (None, 12, 12, 160) 0 ['batch_normalization_55[0][0]']
conv2d_51 (Conv2D) (None, 12, 12, 160) 122880 ['mixed5[0][0]']
conv2d_56 (Conv2D) (None, 12, 12, 160) 179200 ['activation_55[0][0]']
batch_normalization_51 (BatchN (None, 12, 12, 160) 480 ['conv2d_51[0][0]']
ormalization)
batch_normalization_56 (BatchN (None, 12, 12, 160) 480 ['conv2d_56[0][0]']
ormalization)
activation_51 (Activation) (None, 12, 12, 160) 0 ['batch_normalization_51[0][0]']
activation_56 (Activation) (None, 12, 12, 160) 0 ['batch_normalization_56[0][0]']
conv2d_52 (Conv2D) (None, 12, 12, 160) 179200 ['activation_51[0][0]']
conv2d_57 (Conv2D) (None, 12, 12, 160) 179200 ['activation_56[0][0]']
batch_normalization_52 (BatchN (None, 12, 12, 160) 480 ['conv2d_52[0][0]']
ormalization)
batch_normalization_57 (BatchN (None, 12, 12, 160) 480 ['conv2d_57[0][0]']
ormalization)
activation_52 (Activation) (None, 12, 12, 160) 0 ['batch_normalization_52[0][0]']
activation_57 (Activation) (None, 12, 12, 160) 0 ['batch_normalization_57[0][0]']
average_pooling2d_5 (AveragePo (None, 12, 12, 768) 0 ['mixed5[0][0]']
oling2D)
conv2d_50 (Conv2D) (None, 12, 12, 192) 147456 ['mixed5[0][0]']
conv2d_53 (Conv2D) (None, 12, 12, 192) 215040 ['activation_52[0][0]']
conv2d_58 (Conv2D) (None, 12, 12, 192) 215040 ['activation_57[0][0]']
conv2d_59 (Conv2D) (None, 12, 12, 192) 147456 ['average_pooling2d_5[0][0]']
batch_normalization_50 (BatchN (None, 12, 12, 192) 576 ['conv2d_50[0][0]']
ormalization)
batch_normalization_53 (BatchN (None, 12, 12, 192) 576 ['conv2d_53[0][0]']
ormalization)
batch_normalization_58 (BatchN (None, 12, 12, 192) 576 ['conv2d_58[0][0]']
ormalization)
batch_normalization_59 (BatchN (None, 12, 12, 192) 576 ['conv2d_59[0][0]']
ormalization)
activation_50 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_50[0][0]']
activation_53 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_53[0][0]']
activation_58 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_58[0][0]']
activation_59 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_59[0][0]']
mixed6 (Concatenate) (None, 12, 12, 768) 0 ['activation_50[0][0]',
'activation_53[0][0]',
'activation_58[0][0]',
'activation_59[0][0]']
conv2d_64 (Conv2D) (None, 12, 12, 192) 147456 ['mixed6[0][0]']
batch_normalization_64 (BatchN (None, 12, 12, 192) 576 ['conv2d_64[0][0]']
ormalization)
activation_64 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_64[0][0]']
conv2d_65 (Conv2D) (None, 12, 12, 192) 258048 ['activation_64[0][0]']
batch_normalization_65 (BatchN (None, 12, 12, 192) 576 ['conv2d_65[0][0]']
ormalization)
activation_65 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_65[0][0]']
conv2d_61 (Conv2D) (None, 12, 12, 192) 147456 ['mixed6[0][0]']
conv2d_66 (Conv2D) (None, 12, 12, 192) 258048 ['activation_65[0][0]']
batch_normalization_61 (BatchN (None, 12, 12, 192) 576 ['conv2d_61[0][0]']
ormalization)
batch_normalization_66 (BatchN (None, 12, 12, 192) 576 ['conv2d_66[0][0]']
ormalization)
activation_61 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_61[0][0]']
activation_66 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_66[0][0]']
conv2d_62 (Conv2D) (None, 12, 12, 192) 258048 ['activation_61[0][0]']
conv2d_67 (Conv2D) (None, 12, 12, 192) 258048 ['activation_66[0][0]']
batch_normalization_62 (BatchN (None, 12, 12, 192) 576 ['conv2d_62[0][0]']
ormalization)
batch_normalization_67 (BatchN (None, 12, 12, 192) 576 ['conv2d_67[0][0]']
ormalization)
activation_62 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_62[0][0]']
activation_67 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_67[0][0]']
average_pooling2d_6 (AveragePo (None, 12, 12, 768) 0 ['mixed6[0][0]']
oling2D)
conv2d_60 (Conv2D) (None, 12, 12, 192) 147456 ['mixed6[0][0]']
conv2d_63 (Conv2D) (None, 12, 12, 192) 258048 ['activation_62[0][0]']
conv2d_68 (Conv2D) (None, 12, 12, 192) 258048 ['activation_67[0][0]']
conv2d_69 (Conv2D) (None, 12, 12, 192) 147456 ['average_pooling2d_6[0][0]']
batch_normalization_60 (BatchN (None, 12, 12, 192) 576 ['conv2d_60[0][0]']
ormalization)
batch_normalization_63 (BatchN (None, 12, 12, 192) 576 ['conv2d_63[0][0]']
ormalization)
batch_normalization_68 (BatchN (None, 12, 12, 192) 576 ['conv2d_68[0][0]']
ormalization)
batch_normalization_69 (BatchN (None, 12, 12, 192) 576 ['conv2d_69[0][0]']
ormalization)
activation_60 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_60[0][0]']
activation_63 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_63[0][0]']
activation_68 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_68[0][0]']
activation_69 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_69[0][0]']
mixed7 (Concatenate) (None, 12, 12, 768) 0 ['activation_60[0][0]',
'activation_63[0][0]',
'activation_68[0][0]',
'activation_69[0][0]']
conv2d_72 (Conv2D) (None, 12, 12, 192) 147456 ['mixed7[0][0]']
batch_normalization_72 (BatchN (None, 12, 12, 192) 576 ['conv2d_72[0][0]']
ormalization)
activation_72 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_72[0][0]']
conv2d_73 (Conv2D) (None, 12, 12, 192) 258048 ['activation_72[0][0]']
batch_normalization_73 (BatchN (None, 12, 12, 192) 576 ['conv2d_73[0][0]']
ormalization)
activation_73 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_73[0][0]']
conv2d_70 (Conv2D) (None, 12, 12, 192) 147456 ['mixed7[0][0]']
conv2d_74 (Conv2D) (None, 12, 12, 192) 258048 ['activation_73[0][0]']
batch_normalization_70 (BatchN (None, 12, 12, 192) 576 ['conv2d_70[0][0]']
ormalization)
batch_normalization_74 (BatchN (None, 12, 12, 192) 576 ['conv2d_74[0][0]']
ormalization)
activation_70 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_70[0][0]']
activation_74 (Activation) (None, 12, 12, 192) 0 ['batch_normalization_74[0][0]']
conv2d_71 (Conv2D) (None, 5, 5, 320) 552960 ['activation_70[0][0]']
conv2d_75 (Conv2D) (None, 5, 5, 192) 331776 ['activation_74[0][0]']
batch_normalization_71 (BatchN (None, 5, 5, 320) 960 ['conv2d_71[0][0]']
ormalization)
batch_normalization_75 (BatchN (None, 5, 5, 192) 576 ['conv2d_75[0][0]']
ormalization)
activation_71 (Activation) (None, 5, 5, 320) 0 ['batch_normalization_71[0][0]']
activation_75 (Activation) (None, 5, 5, 192) 0 ['batch_normalization_75[0][0]']
max_pooling2d_3 (MaxPooling2D) (None, 5, 5, 768) 0 ['mixed7[0][0]']
mixed8 (Concatenate) (None, 5, 5, 1280) 0 ['activation_71[0][0]',
'activation_75[0][0]',
'max_pooling2d_3[0][0]']
conv2d_80 (Conv2D) (None, 5, 5, 448) 573440 ['mixed8[0][0]']
batch_normalization_80 (BatchN (None, 5, 5, 448) 1344 ['conv2d_80[0][0]']
ormalization)
activation_80 (Activation) (None, 5, 5, 448) 0 ['batch_normalization_80[0][0]']
conv2d_77 (Conv2D) (None, 5, 5, 384) 491520 ['mixed8[0][0]']
conv2d_81 (Conv2D) (None, 5, 5, 384) 1548288 ['activation_80[0][0]']
batch_normalization_77 (BatchN (None, 5, 5, 384) 1152 ['conv2d_77[0][0]']
ormalization)
batch_normalization_81 (BatchN (None, 5, 5, 384) 1152 ['conv2d_81[0][0]']
ormalization)
activation_77 (Activation) (None, 5, 5, 384) 0 ['batch_normalization_77[0][0]']
activation_81 (Activation) (None, 5, 5, 384) 0 ['batch_normalization_81[0][0]']
conv2d_78 (Conv2D) (None, 5, 5, 384) 442368 ['activation_77[0][0]']
conv2d_79 (Conv2D) (None, 5, 5, 384) 442368 ['activation_77[0][0]']
conv2d_82 (Conv2D) (None, 5, 5, 384) 442368 ['activation_81[0][0]']
conv2d_83 (Conv2D) (None, 5, 5, 384) 442368 ['activation_81[0][0]']
average_pooling2d_7 (AveragePo (None, 5, 5, 1280) 0 ['mixed8[0][0]']
oling2D)
conv2d_76 (Conv2D) (None, 5, 5, 320) 409600 ['mixed8[0][0]']
batch_normalization_78 (BatchN (None, 5, 5, 384) 1152 ['conv2d_78[0][0]']
ormalization)
batch_normalization_79 (BatchN (None, 5, 5, 384) 1152 ['conv2d_79[0][0]']
ormalization)
batch_normalization_82 (BatchN (None, 5, 5, 384) 1152 ['conv2d_82[0][0]']
ormalization)
batch_normalization_83 (BatchN (None, 5, 5, 384) 1152 ['conv2d_83[0][0]']
ormalization)
conv2d_84 (Conv2D) (None, 5, 5, 192) 245760 ['average_pooling2d_7[0][0]']
batch_normalization_76 (BatchN (None, 5, 5, 320) 960 ['conv2d_76[0][0]']
ormalization)
activation_78 (Activation) (None, 5, 5, 384) 0 ['batch_normalization_78[0][0]']
activation_79 (Activation) (None, 5, 5, 384) 0 ['batch_normalization_79[0][0]']
activation_82 (Activation) (None, 5, 5, 384) 0 ['batch_normalization_82[0][0]']
activation_83 (Activation) (None, 5, 5, 384) 0 ['batch_normalization_83[0][0]']
batch_normalization_84 (BatchN (None, 5, 5, 192) 576 ['conv2d_84[0][0]']
ormalization)
activation_76 (Activation) (None, 5, 5, 320) 0 ['batch_normalization_76[0][0]']
mixed9_0 (Concatenate) (None, 5, 5, 768) 0 ['activation_78[0][0]',
'activation_79[0][0]']
concatenate (Concatenate) (None, 5, 5, 768) 0 ['activation_82[0][0]',
'activation_83[0][0]']
activation_84 (Activation) (None, 5, 5, 192) 0 ['batch_normalization_84[0][0]']
mixed9 (Concatenate) (None, 5, 5, 2048) 0 ['activation_76[0][0]',
'mixed9_0[0][0]',
'concatenate[0][0]',
'activation_84[0][0]']
conv2d_89 (Conv2D) (None, 5, 5, 448) 917504 ['mixed9[0][0]']
batch_normalization_89 (BatchN (None, 5, 5, 448) 1344 ['conv2d_89[0][0]']
ormalization)
activation_89 (Activation) (None, 5, 5, 448) 0 ['batch_normalization_89[0][0]']
conv2d_86 (Conv2D) (None, 5, 5, 384) 786432 ['mixed9[0][0]']
conv2d_90 (Conv2D) (None, 5, 5, 384) 1548288 ['activation_89[0][0]']
batch_normalization_86 (BatchN (None, 5, 5, 384) 1152 ['conv2d_86[0][0]']
ormalization)
batch_normalization_90 (BatchN (None, 5, 5, 384) 1152 ['conv2d_90[0][0]']
ormalization)
activation_86 (Activation) (None, 5, 5, 384) 0 ['batch_normalization_86[0][0]']
activation_90 (Activation) (None, 5, 5, 384) 0 ['batch_normalization_90[0][0]']
conv2d_87 (Conv2D) (None, 5, 5, 384) 442368 ['activation_86[0][0]']
conv2d_88 (Conv2D) (None, 5, 5, 384) 442368 ['activation_86[0][0]']
conv2d_91 (Conv2D) (None, 5, 5, 384) 442368 ['activation_90[0][0]']
conv2d_92 (Conv2D) (None, 5, 5, 384) 442368 ['activation_90[0][0]']
average_pooling2d_8 (AveragePo (None, 5, 5, 2048) 0 ['mixed9[0][0]']
oling2D)
conv2d_85 (Conv2D) (None, 5, 5, 320) 655360 ['mixed9[0][0]']
batch_normalization_87 (BatchN (None, 5, 5, 384) 1152 ['conv2d_87[0][0]']
ormalization)
batch_normalization_88 (BatchN (None, 5, 5, 384) 1152 ['conv2d_88[0][0]']
ormalization)
batch_normalization_91 (BatchN (None, 5, 5, 384) 1152 ['conv2d_91[0][0]']
ormalization)
batch_normalization_92 (BatchN (None, 5, 5, 384) 1152 ['conv2d_92[0][0]']
ormalization)
conv2d_93 (Conv2D) (None, 5, 5, 192) 393216 ['average_pooling2d_8[0][0]']
batch_normalization_85 (BatchN (None, 5, 5, 320) 960 ['conv2d_85[0][0]']
ormalization)
activation_87 (Activation) (None, 5, 5, 384) 0 ['batch_normalization_87[0][0]']
activation_88 (Activation) (None, 5, 5, 384) 0 ['batch_normalization_88[0][0]']
activation_91 (Activation) (None, 5, 5, 384) 0 ['batch_normalization_91[0][0]']
activation_92 (Activation) (None, 5, 5, 384) 0 ['batch_normalization_92[0][0]']
batch_normalization_93 (BatchN (None, 5, 5, 192) 576 ['conv2d_93[0][0]']
ormalization)
activation_85 (Activation) (None, 5, 5, 320) 0 ['batch_normalization_85[0][0]']
mixed9_1 (Concatenate) (None, 5, 5, 768) 0 ['activation_87[0][0]',
'activation_88[0][0]']
concatenate_1 (Concatenate) (None, 5, 5, 768) 0 ['activation_91[0][0]',
'activation_92[0][0]']
activation_93 (Activation) (None, 5, 5, 192) 0 ['batch_normalization_93[0][0]']
mixed10 (Concatenate) (None, 5, 5, 2048) 0 ['activation_85[0][0]',
'mixed9_1[0][0]',
'concatenate_1[0][0]',
'activation_93[0][0]']
global_average_pooling2d (Glob (None, 2048) 0 ['mixed10[0][0]']
alAveragePooling2D)
dense (Dense) (None, 32) 65568 ['global_average_pooling2d[0][0]'
]
dense_1 (Dense) (None, 3) 99 ['dense[0][0]']
==================================================================================================
Total params: 21,868,451
Trainable params: 21,834,019
Non-trainable params: 34,432
__________________________________________________________________________________________________
Cost time: 12533.7671415
基于ResNet50网络
__________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
==================================================================================================
input_1 (InputLayer) [(None, None, None, 0 []
3)]
conv1_pad (ZeroPadding2D) (None, None, None, 0 ['input_1[0][0]']
3)
conv1_conv (Conv2D) (None, None, None, 9472 ['conv1_pad[0][0]']
64)
pool1_pad (ZeroPadding2D) (None, None, None, 0 ['conv1_conv[0][0]']
64)
pool1_pool (MaxPooling2D) (None, None, None, 0 ['pool1_pad[0][0]']
64)
conv2_block1_preact_bn (BatchN (None, None, None, 256 ['pool1_pool[0][0]']
ormalization) 64)
conv2_block1_preact_relu (Acti (None, None, None, 0 ['conv2_block1_preact_bn[0][0]']
vation) 64)
conv2_block1_1_conv (Conv2D) (None, None, None, 4096 ['conv2_block1_preact_relu[0][0]'
64) ]
conv2_block1_1_bn (BatchNormal (None, None, None, 256 ['conv2_block1_1_conv[0][0]']
ization) 64)
conv2_block1_1_relu (Activatio (None, None, None, 0 ['conv2_block1_1_bn[0][0]']
n) 64)
conv2_block1_2_pad (ZeroPaddin (None, None, None, 0 ['conv2_block1_1_relu[0][0]']
g2D) 64)
conv2_block1_2_conv (Conv2D) (None, None, None, 36864 ['conv2_block1_2_pad[0][0]']
64)
conv2_block1_2_bn (BatchNormal (None, None, None, 256 ['conv2_block1_2_conv[0][0]']
ization) 64)
conv2_block1_2_relu (Activatio (None, None, None, 0 ['conv2_block1_2_bn[0][0]']
n) 64)
conv2_block1_0_conv (Conv2D) (None, None, None, 16640 ['conv2_block1_preact_relu[0][0]'
256) ]
conv2_block1_3_conv (Conv2D) (None, None, None, 16640 ['conv2_block1_2_relu[0][0]']
256)
conv2_block1_out (Add) (None, None, None, 0 ['conv2_block1_0_conv[0][0]',
256) 'conv2_block1_3_conv[0][0]']
conv2_block2_preact_bn (BatchN (None, None, None, 1024 ['conv2_block1_out[0][0]']
ormalization) 256)
conv2_block2_preact_relu (Acti (None, None, None, 0 ['conv2_block2_preact_bn[0][0]']
vation) 256)
conv2_block2_1_conv (Conv2D) (None, None, None, 16384 ['conv2_block2_preact_relu[0][0]'
64) ]
conv2_block2_1_bn (BatchNormal (None, None, None, 256 ['conv2_block2_1_conv[0][0]']
ization) 64)
conv2_block2_1_relu (Activatio (None, None, None, 0 ['conv2_block2_1_bn[0][0]']
n) 64)
conv2_block2_2_pad (ZeroPaddin (None, None, None, 0 ['conv2_block2_1_relu[0][0]']
g2D) 64)
conv2_block2_2_conv (Conv2D) (None, None, None, 36864 ['conv2_block2_2_pad[0][0]']
64)
conv2_block2_2_bn (BatchNormal (None, None, None, 256 ['conv2_block2_2_conv[0][0]']
ization) 64)
conv2_block2_2_relu (Activatio (None, None, None, 0 ['conv2_block2_2_bn[0][0]']
n) 64)
conv2_block2_3_conv (Conv2D) (None, None, None, 16640 ['conv2_block2_2_relu[0][0]']
256)
conv2_block2_out (Add) (None, None, None, 0 ['conv2_block1_out[0][0]',
256) 'conv2_block2_3_conv[0][0]']
conv2_block3_preact_bn (BatchN (None, None, None, 1024 ['conv2_block2_out[0][0]']
ormalization) 256)
conv2_block3_preact_relu (Acti (None, None, None, 0 ['conv2_block3_preact_bn[0][0]']
vation) 256)
conv2_block3_1_conv (Conv2D) (None, None, None, 16384 ['conv2_block3_preact_relu[0][0]'
64) ]
conv2_block3_1_bn (BatchNormal (None, None, None, 256 ['conv2_block3_1_conv[0][0]']
ization) 64)
conv2_block3_1_relu (Activatio (None, None, None, 0 ['conv2_block3_1_bn[0][0]']
n) 64)
conv2_block3_2_pad (ZeroPaddin (None, None, None, 0 ['conv2_block3_1_relu[0][0]']
g2D) 64)
conv2_block3_2_conv (Conv2D) (None, None, None, 36864 ['conv2_block3_2_pad[0][0]']
64)
conv2_block3_2_bn (BatchNormal (None, None, None, 256 ['conv2_block3_2_conv[0][0]']
ization) 64)
conv2_block3_2_relu (Activatio (None, None, None, 0 ['conv2_block3_2_bn[0][0]']
n) 64)
max_pooling2d (MaxPooling2D) (None, None, None, 0 ['conv2_block2_out[0][0]']
256)
conv2_block3_3_conv (Conv2D) (None, None, None, 16640 ['conv2_block3_2_relu[0][0]']
256)
conv2_block3_out (Add) (None, None, None, 0 ['max_pooling2d[0][0]',
256) 'conv2_block3_3_conv[0][0]']
conv3_block1_preact_bn (BatchN (None, None, None, 1024 ['conv2_block3_out[0][0]']
ormalization) 256)
conv3_block1_preact_relu (Acti (None, None, None, 0 ['conv3_block1_preact_bn[0][0]']
vation) 256)
conv3_block1_1_conv (Conv2D) (None, None, None, 32768 ['conv3_block1_preact_relu[0][0]'
128) ]
conv3_block1_1_bn (BatchNormal (None, None, None, 512 ['conv3_block1_1_conv[0][0]']
ization) 128)
conv3_block1_1_relu (Activatio (None, None, None, 0 ['conv3_block1_1_bn[0][0]']
n) 128)
conv3_block1_2_pad (ZeroPaddin (None, None, None, 0 ['conv3_block1_1_relu[0][0]']
g2D) 128)
conv3_block1_2_conv (Conv2D) (None, None, None, 147456 ['conv3_block1_2_pad[0][0]']
128)
conv3_block1_2_bn (BatchNormal (None, None, None, 512 ['conv3_block1_2_conv[0][0]']
ization) 128)
conv3_block1_2_relu (Activatio (None, None, None, 0 ['conv3_block1_2_bn[0][0]']
n) 128)
conv3_block1_0_conv (Conv2D) (None, None, None, 131584 ['conv3_block1_preact_relu[0][0]'
512) ]
conv3_block1_3_conv (Conv2D) (None, None, None, 66048 ['conv3_block1_2_relu[0][0]']
512)
conv3_block1_out (Add) (None, None, None, 0 ['conv3_block1_0_conv[0][0]',
512) 'conv3_block1_3_conv[0][0]']
conv3_block2_preact_bn (BatchN (None, None, None, 2048 ['conv3_block1_out[0][0]']
ormalization) 512)
conv3_block2_preact_relu (Acti (None, None, None, 0 ['conv3_block2_preact_bn[0][0]']
vation) 512)
conv3_block2_1_conv (Conv2D) (None, None, None, 65536 ['conv3_block2_preact_relu[0][0]'
128) ]
conv3_block2_1_bn (BatchNormal (None, None, None, 512 ['conv3_block2_1_conv[0][0]']
ization) 128)
conv3_block2_1_relu (Activatio (None, None, None, 0 ['conv3_block2_1_bn[0][0]']
n) 128)
conv3_block2_2_pad (ZeroPaddin (None, None, None, 0 ['conv3_block2_1_relu[0][0]']
g2D) 128)
conv3_block2_2_conv (Conv2D) (None, None, None, 147456 ['conv3_block2_2_pad[0][0]']
128)
conv3_block2_2_bn (BatchNormal (None, None, None, 512 ['conv3_block2_2_conv[0][0]']
ization) 128)
conv3_block2_2_relu (Activatio (None, None, None, 0 ['conv3_block2_2_bn[0][0]']
n) 128)
conv3_block2_3_conv (Conv2D) (None, None, None, 66048 ['conv3_block2_2_relu[0][0]']
512)
conv3_block2_out (Add) (None, None, None, 0 ['conv3_block1_out[0][0]',
512) 'conv3_block2_3_conv[0][0]']
conv3_block3_preact_bn (BatchN (None, None, None, 2048 ['conv3_block2_out[0][0]']
ormalization) 512)
conv3_block3_preact_relu (Acti (None, None, None, 0 ['conv3_block3_preact_bn[0][0]']
vation) 512)
conv3_block3_1_conv (Conv2D) (None, None, None, 65536 ['conv3_block3_preact_relu[0][0]'
128) ]
conv3_block3_1_bn (BatchNormal (None, None, None, 512 ['conv3_block3_1_conv[0][0]']
ization) 128)
conv3_block3_1_relu (Activatio (None, None, None, 0 ['conv3_block3_1_bn[0][0]']
n) 128)
conv3_block3_2_pad (ZeroPaddin (None, None, None, 0 ['conv3_block3_1_relu[0][0]']
g2D) 128)
conv3_block3_2_conv (Conv2D) (None, None, None, 147456 ['conv3_block3_2_pad[0][0]']
128)
conv3_block3_2_bn (BatchNormal (None, None, None, 512 ['conv3_block3_2_conv[0][0]']
ization) 128)
conv3_block3_2_relu (Activatio (None, None, None, 0 ['conv3_block3_2_bn[0][0]']
n) 128)
conv3_block3_3_conv (Conv2D) (None, None, None, 66048 ['conv3_block3_2_relu[0][0]']
512)
conv3_block3_out (Add) (None, None, None, 0 ['conv3_block2_out[0][0]',
512) 'conv3_block3_3_conv[0][0]']
conv3_block4_preact_bn (BatchN (None, None, None, 2048 ['conv3_block3_out[0][0]']
ormalization) 512)
conv3_block4_preact_relu (Acti (None, None, None, 0 ['conv3_block4_preact_bn[0][0]']
vation) 512)
conv3_block4_1_conv (Conv2D) (None, None, None, 65536 ['conv3_block4_preact_relu[0][0]'
128) ]
conv3_block4_1_bn (BatchNormal (None, None, None, 512 ['conv3_block4_1_conv[0][0]']
ization) 128)
conv3_block4_1_relu (Activatio (None, None, None, 0 ['conv3_block4_1_bn[0][0]']
n) 128)
conv3_block4_2_pad (ZeroPaddin (None, None, None, 0 ['conv3_block4_1_relu[0][0]']
g2D) 128)
conv3_block4_2_conv (Conv2D) (None, None, None, 147456 ['conv3_block4_2_pad[0][0]']
128)
conv3_block4_2_bn (BatchNormal (None, None, None, 512 ['conv3_block4_2_conv[0][0]']
ization) 128)
conv3_block4_2_relu (Activatio (None, None, None, 0 ['conv3_block4_2_bn[0][0]']
n) 128)
max_pooling2d_1 (MaxPooling2D) (None, None, None, 0 ['conv3_block3_out[0][0]']
512)
conv3_block4_3_conv (Conv2D) (None, None, None, 66048 ['conv3_block4_2_relu[0][0]']
512)
conv3_block4_out (Add) (None, None, None, 0 ['max_pooling2d_1[0][0]',
512) 'conv3_block4_3_conv[0][0]']
conv4_block1_preact_bn (BatchN (None, None, None, 2048 ['conv3_block4_out[0][0]']
ormalization) 512)
conv4_block1_preact_relu (Acti (None, None, None, 0 ['conv4_block1_preact_bn[0][0]']
vation) 512)
conv4_block1_1_conv (Conv2D) (None, None, None, 131072 ['conv4_block1_preact_relu[0][0]'
256) ]
conv4_block1_1_bn (BatchNormal (None, None, None, 1024 ['conv4_block1_1_conv[0][0]']
ization) 256)
conv4_block1_1_relu (Activatio (None, None, None, 0 ['conv4_block1_1_bn[0][0]']
n) 256)
conv4_block1_2_pad (ZeroPaddin (None, None, None, 0 ['conv4_block1_1_relu[0][0]']
g2D) 256)
conv4_block1_2_conv (Conv2D) (None, None, None, 589824 ['conv4_block1_2_pad[0][0]']
256)
conv4_block1_2_bn (BatchNormal (None, None, None, 1024 ['conv4_block1_2_conv[0][0]']
ization) 256)
conv4_block1_2_relu (Activatio (None, None, None, 0 ['conv4_block1_2_bn[0][0]']
n) 256)
conv4_block1_0_conv (Conv2D) (None, None, None, 525312 ['conv4_block1_preact_relu[0][0]'
1024) ]
conv4_block1_3_conv (Conv2D) (None, None, None, 263168 ['conv4_block1_2_relu[0][0]']
1024)
conv4_block1_out (Add) (None, None, None, 0 ['conv4_block1_0_conv[0][0]',
1024) 'conv4_block1_3_conv[0][0]']
conv4_block2_preact_bn (BatchN (None, None, None, 4096 ['conv4_block1_out[0][0]']
ormalization) 1024)
conv4_block2_preact_relu (Acti (None, None, None, 0 ['conv4_block2_preact_bn[0][0]']
vation) 1024)
conv4_block2_1_conv (Conv2D) (None, None, None, 262144 ['conv4_block2_preact_relu[0][0]'
256) ]
conv4_block2_1_bn (BatchNormal (None, None, None, 1024 ['conv4_block2_1_conv[0][0]']
ization) 256)
conv4_block2_1_relu (Activatio (None, None, None, 0 ['conv4_block2_1_bn[0][0]']
n) 256)
conv4_block2_2_pad (ZeroPaddin (None, None, None, 0 ['conv4_block2_1_relu[0][0]']
g2D) 256)
conv4_block2_2_conv (Conv2D) (None, None, None, 589824 ['conv4_block2_2_pad[0][0]']
256)
conv4_block2_2_bn (BatchNormal (None, None, None, 1024 ['conv4_block2_2_conv[0][0]']
ization) 256)
conv4_block2_2_relu (Activatio (None, None, None, 0 ['conv4_block2_2_bn[0][0]']
n) 256)
conv4_block2_3_conv (Conv2D) (None, None, None, 263168 ['conv4_block2_2_relu[0][0]']
1024)
conv4_block2_out (Add) (None, None, None, 0 ['conv4_block1_out[0][0]',
1024) 'conv4_block2_3_conv[0][0]']
conv4_block3_preact_bn (BatchN (None, None, None, 4096 ['conv4_block2_out[0][0]']
ormalization) 1024)
conv4_block3_preact_relu (Acti (None, None, None, 0 ['conv4_block3_preact_bn[0][0]']
vation) 1024)
conv4_block3_1_conv (Conv2D) (None, None, None, 262144 ['conv4_block3_preact_relu[0][0]'
256) ]
conv4_block3_1_bn (BatchNormal (None, None, None, 1024 ['conv4_block3_1_conv[0][0]']
ization) 256)
conv4_block3_1_relu (Activatio (None, None, None, 0 ['conv4_block3_1_bn[0][0]']
n) 256)
conv4_block3_2_pad (ZeroPaddin (None, None, None, 0 ['conv4_block3_1_relu[0][0]']
g2D) 256)
conv4_block3_2_conv (Conv2D) (None, None, None, 589824 ['conv4_block3_2_pad[0][0]']
256)
conv4_block3_2_bn (BatchNormal (None, None, None, 1024 ['conv4_block3_2_conv[0][0]']
ization) 256)
conv4_block3_2_relu (Activatio (None, None, None, 0 ['conv4_block3_2_bn[0][0]']
n) 256)
conv4_block3_3_conv (Conv2D) (None, None, None, 263168 ['conv4_block3_2_relu[0][0]']
1024)
conv4_block3_out (Add) (None, None, None, 0 ['conv4_block2_out[0][0]',
1024) 'conv4_block3_3_conv[0][0]']
conv4_block4_preact_bn (BatchN (None, None, None, 4096 ['conv4_block3_out[0][0]']
ormalization) 1024)
conv4_block4_preact_relu (Acti (None, None, None, 0 ['conv4_block4_preact_bn[0][0]']
vation) 1024)
conv4_block4_1_conv (Conv2D) (None, None, None, 262144 ['conv4_block4_preact_relu[0][0]'
256) ]
conv4_block4_1_bn (BatchNormal (None, None, None, 1024 ['conv4_block4_1_conv[0][0]']
ization) 256)
conv4_block4_1_relu (Activatio (None, None, None, 0 ['conv4_block4_1_bn[0][0]']
n) 256)
conv4_block4_2_pad (ZeroPaddin (None, None, None, 0 ['conv4_block4_1_relu[0][0]']
g2D) 256)
conv4_block4_2_conv (Conv2D) (None, None, None, 589824 ['conv4_block4_2_pad[0][0]']
256)
conv4_block4_2_bn (BatchNormal (None, None, None, 1024 ['conv4_block4_2_conv[0][0]']
ization) 256)
conv4_block4_2_relu (Activatio (None, None, None, 0 ['conv4_block4_2_bn[0][0]']
n) 256)
conv4_block4_3_conv (Conv2D) (None, None, None, 263168 ['conv4_block4_2_relu[0][0]']
1024)
conv4_block4_out (Add) (None, None, None, 0 ['conv4_block3_out[0][0]',
1024) 'conv4_block4_3_conv[0][0]']
conv4_block5_preact_bn (BatchN (None, None, None, 4096 ['conv4_block4_out[0][0]']
ormalization) 1024)
conv4_block5_preact_relu (Acti (None, None, None, 0 ['conv4_block5_preact_bn[0][0]']
vation) 1024)
conv4_block5_1_conv (Conv2D) (None, None, None, 262144 ['conv4_block5_preact_relu[0][0]'
256) ]
conv4_block5_1_bn (BatchNormal (None, None, None, 1024 ['conv4_block5_1_conv[0][0]']
ization) 256)
conv4_block5_1_relu (Activatio (None, None, None, 0 ['conv4_block5_1_bn[0][0]']
n) 256)
conv4_block5_2_pad (ZeroPaddin (None, None, None, 0 ['conv4_block5_1_relu[0][0]']
g2D) 256)
conv4_block5_2_conv (Conv2D) (None, None, None, 589824 ['conv4_block5_2_pad[0][0]']
256)
conv4_block5_2_bn (BatchNormal (None, None, None, 1024 ['conv4_block5_2_conv[0][0]']
ization) 256)
conv4_block5_2_relu (Activatio (None, None, None, 0 ['conv4_block5_2_bn[0][0]']
n) 256)
conv4_block5_3_conv (Conv2D) (None, None, None, 263168 ['conv4_block5_2_relu[0][0]']
1024)
conv4_block5_out (Add) (None, None, None, 0 ['conv4_block4_out[0][0]',
1024) 'conv4_block5_3_conv[0][0]']
conv4_block6_preact_bn (BatchN (None, None, None, 4096 ['conv4_block5_out[0][0]']
ormalization) 1024)
conv4_block6_preact_relu (Acti (None, None, None, 0 ['conv4_block6_preact_bn[0][0]']
vation) 1024)
conv4_block6_1_conv (Conv2D) (None, None, None, 262144 ['conv4_block6_preact_relu[0][0]'
256) ]
conv4_block6_1_bn (BatchNormal (None, None, None, 1024 ['conv4_block6_1_conv[0][0]']
ization) 256)
conv4_block6_1_relu (Activatio (None, None, None, 0 ['conv4_block6_1_bn[0][0]']
n) 256)
conv4_block6_2_pad (ZeroPaddin (None, None, None, 0 ['conv4_block6_1_relu[0][0]']
g2D) 256)
conv4_block6_2_conv (Conv2D) (None, None, None, 589824 ['conv4_block6_2_pad[0][0]']
256)
conv4_block6_2_bn (BatchNormal (None, None, None, 1024 ['conv4_block6_2_conv[0][0]']
ization) 256)
conv4_block6_2_relu (Activatio (None, None, None, 0 ['conv4_block6_2_bn[0][0]']
n) 256)
max_pooling2d_2 (MaxPooling2D) (None, None, None, 0 ['conv4_block5_out[0][0]']
1024)
conv4_block6_3_conv (Conv2D) (None, None, None, 263168 ['conv4_block6_2_relu[0][0]']
1024)
conv4_block6_out (Add) (None, None, None, 0 ['max_pooling2d_2[0][0]',
1024) 'conv4_block6_3_conv[0][0]']
conv5_block1_preact_bn (BatchN (None, None, None, 4096 ['conv4_block6_out[0][0]']
ormalization) 1024)
conv5_block1_preact_relu (Acti (None, None, None, 0 ['conv5_block1_preact_bn[0][0]']
vation) 1024)
conv5_block1_1_conv (Conv2D) (None, None, None, 524288 ['conv5_block1_preact_relu[0][0]'
512) ]
conv5_block1_1_bn (BatchNormal (None, None, None, 2048 ['conv5_block1_1_conv[0][0]']
ization) 512)
conv5_block1_1_relu (Activatio (None, None, None, 0 ['conv5_block1_1_bn[0][0]']
n) 512)
conv5_block1_2_pad (ZeroPaddin (None, None, None, 0 ['conv5_block1_1_relu[0][0]']
g2D) 512)
conv5_block1_2_conv (Conv2D) (None, None, None, 2359296 ['conv5_block1_2_pad[0][0]']
512)
conv5_block1_2_bn (BatchNormal (None, None, None, 2048 ['conv5_block1_2_conv[0][0]']
ization) 512)
conv5_block1_2_relu (Activatio (None, None, None, 0 ['conv5_block1_2_bn[0][0]']
n) 512)
conv5_block1_0_conv (Conv2D) (None, None, None, 2099200 ['conv5_block1_preact_relu[0][0]'
2048) ]
conv5_block1_3_conv (Conv2D) (None, None, None, 1050624 ['conv5_block1_2_relu[0][0]']
2048)
conv5_block1_out (Add) (None, None, None, 0 ['conv5_block1_0_conv[0][0]',
2048) 'conv5_block1_3_conv[0][0]']
conv5_block2_preact_bn (BatchN (None, None, None, 8192 ['conv5_block1_out[0][0]']
ormalization) 2048)
conv5_block2_preact_relu (Acti (None, None, None, 0 ['conv5_block2_preact_bn[0][0]']
vation) 2048)
conv5_block2_1_conv (Conv2D) (None, None, None, 1048576 ['conv5_block2_preact_relu[0][0]'
512) ]
conv5_block2_1_bn (BatchNormal (None, None, None, 2048 ['conv5_block2_1_conv[0][0]']
ization) 512)
conv5_block2_1_relu (Activatio (None, None, None, 0 ['conv5_block2_1_bn[0][0]']
n) 512)
conv5_block2_2_pad (ZeroPaddin (None, None, None, 0 ['conv5_block2_1_relu[0][0]']
g2D) 512)
conv5_block2_2_conv (Conv2D) (None, None, None, 2359296 ['conv5_block2_2_pad[0][0]']
512)
conv5_block2_2_bn (BatchNormal (None, None, None, 2048 ['conv5_block2_2_conv[0][0]']
ization) 512)
conv5_block2_2_relu (Activatio (None, None, None, 0 ['conv5_block2_2_bn[0][0]']
n) 512)
conv5_block2_3_conv (Conv2D) (None, None, None, 1050624 ['conv5_block2_2_relu[0][0]']
2048)
conv5_block2_out (Add) (None, None, None, 0 ['conv5_block1_out[0][0]',
2048) 'conv5_block2_3_conv[0][0]']
conv5_block3_preact_bn (BatchN (None, None, None, 8192 ['conv5_block2_out[0][0]']
ormalization) 2048)
conv5_block3_preact_relu (Acti (None, None, None, 0 ['conv5_block3_preact_bn[0][0]']
vation) 2048)
conv5_block3_1_conv (Conv2D) (None, None, None, 1048576 ['conv5_block3_preact_relu[0][0]'
512) ]
conv5_block3_1_bn (BatchNormal (None, None, None, 2048 ['conv5_block3_1_conv[0][0]']
ization) 512)
conv5_block3_1_relu (Activatio (None, None, None, 0 ['conv5_block3_1_bn[0][0]']
n) 512)
conv5_block3_2_pad (ZeroPaddin (None, None, None, 0 ['conv5_block3_1_relu[0][0]']
g2D) 512)
conv5_block3_2_conv (Conv2D) (None, None, None, 2359296 ['conv5_block3_2_pad[0][0]']
512)
conv5_block3_2_bn (BatchNormal (None, None, None, 2048 ['conv5_block3_2_conv[0][0]']
ization) 512)
conv5_block3_2_relu (Activatio (None, None, None, 0 ['conv5_block3_2_bn[0][0]']
n) 512)
conv5_block3_3_conv (Conv2D) (None, None, None, 1050624 ['conv5_block3_2_relu[0][0]']
2048)
conv5_block3_out (Add) (None, None, None, 0 ['conv5_block2_out[0][0]',
2048) 'conv5_block3_3_conv[0][0]']
post_bn (BatchNormalization) (None, None, None, 8192 ['conv5_block3_out[0][0]']
2048)
post_relu (Activation) (None, None, None, 0 ['post_bn[0][0]']
2048)
global_average_pooling2d (Glob (None, 2048) 0 ['post_relu[0][0]']
alAveragePooling2D)
dense (Dense) (None, 1024) 2098176 ['global_average_pooling2d[0][0]'
]
dense_1 (Dense) (None, 3) 3075 ['dense[0][0]']
==================================================================================================
Total params: 25,666,051
Trainable params: 25,620,611
Non-trainable params: 45,440
__________________________________________________________________________________________________
Cost time: 14280.014628300001
可以看到这个结果其实是不让人满意的。后续再持续研究,看如何改进。
|