CNN模型复现3 GoogleNet

CNN模型复现3 GoogleNet

  • 3. GoogleNet
    • 3.1 网络结构
    • 3.2 代流程
    • 3.2 代码

3. GoogleNet

3.1 网络结构

(1)大致流程

  1. 首先是两个Conv_MaxPool blocks。
  2. 一系列Inception blocks,Inception blocks之间用MaxPool隔开。
  3. 最后时全连接

(2)Inception blockCNN模型复现3 GoogleNet_第1张图片

Inception block是同一个输入进行四个方向的分流处理。

  1. 1x1 Conv layer
  2. 1x1 Conv layer + 3x3 Conv layer
  3. 1x1 Conv layer + 5x5 Conv layer
  4. 3x3 MaxPool + 1x1 Conv layer
  5. 堆叠以上四个分支的结果

(3) Model
CNN模型复现3 GoogleNet_第2张图片

conv(f=64,k=7x7,s=2)
MaPool(p=3x3,s=2)
    ↓
conv(f=64,k=1x1,s=1)
conv(f=192,k=3x3,s=1)
MaPool(p=3x3,s=2)
    ↓
inception*4 
MaxPool
    ↓
inception*10
MaxPool
    ↓
inception*4
AvgPool
dropout
Dense
softmax

3.2 代流程

  1. 导入程序包
  2. 编写Inception block
  3. 测试Inception block
  4. 编写主干网络
  5. 编写Inception blocks
  6. 建立model

3.2 代码

# 1 Import
from keras import Model
from keras.utils import plot_model
from keras.layers import Input,Conv2D,Concatenate,Dense,Dropout,Flatten,AvgPool2D,MaxPool2D

# 2. Inception block
def inception_block(x,filters):
    # steam1 1x1 Conv layer
    s1 = Conv2D(filters = filters[0],kernel_size=1,strides=1,activation='relu')(x)

    # steam2 1x1 Conv layer + 3x3 Conv layer
    s2 = Conv2D(filters = filters[1],kernel_size=1,strides=1,activation='relu')(x)
    s2 = Conv2D(filters = filters[2],kernel_size=3,strides=1,padding='same',activation='relu')(s2)

    # steam3  1x1 Conv layer + 5x5 Conv layer
    s3 = Conv2D(filters = filters[3],kernel_size=1,strides=1,activation='relu')(x)
    s3 = Conv2D(filters = filters[4],kernel_size=5,strides=1,padding='same',activation='relu')(s3)

    # steam4  3x3 MaxPool + 1x1 Conv layer
    s4 = MaxPool2D(pool_size=3,strides=1,padding='same')(x)
    s4 = Conv2D(filters = filters[5],kernel_size=1,strides=1,activation='relu')(s4)
    return Concatenate()([s1,s2,s3,s4])

# 3 Test Inception block
input = Input([224,224,3])
# output = inception_block(input,[64,96,128,16,32,32])  # inception()3a 
# print(output.shape)
# (?, 224, 224, 15)
# model = Model(input,output)
'''
__________________________________________________________________________________________________
Layer (type)                    Output Shape         Param #     Connected to                     
==================================================================================================
input_1 (InputLayer)            (None, 224, 224, 3)  0                                            
__________________________________________________________________________________________________
conv2d_2 (Conv2D)               (None, 224, 224, 96) 384         input_1[0][0]                    
__________________________________________________________________________________________________
conv2d_4 (Conv2D)               (None, 224, 224, 16) 64          input_1[0][0]                    
__________________________________________________________________________________________________
max_pooling2d_1 (MaxPooling2D)  (None, 224, 224, 3)  0           input_1[0][0]                    
__________________________________________________________________________________________________
conv2d_1 (Conv2D)               (None, 224, 224, 64) 256         input_1[0][0]                    
__________________________________________________________________________________________________
conv2d_3 (Conv2D)               (None, 224, 224, 128 110720      conv2d_2[0][0]                   
__________________________________________________________________________________________________
conv2d_5 (Conv2D)               (None, 224, 224, 32) 12832       conv2d_4[0][0]                   
__________________________________________________________________________________________________
conv2d_6 (Conv2D)               (None, 224, 224, 32) 128         max_pooling2d_1[0][0]            
__________________________________________________________________________________________________
concatenate_1 (Concatenate)     (None, 224, 224, 256 0           conv2d_1[0][0]                   
                                                                 conv2d_3[0][0]                   
                                                                 conv2d_5[0][0]                   
                                                                 conv2d_6[0][0]                   
==================================================================================================
Total params: 124,384
Trainable params: 124,384
Non-trainable params: 0
__________________________________________________________________________________________________

Process finished with exit code 0
'''

# 4. Stem of the model
input = Input(shape=(224,224,3))
x = Conv2D(filters=64,kernel_size=7,strides=2,padding='same',activation='relu')(input)
x = MaxPool2D(pool_size=3,strides=2,padding='same')(x)

x = Conv2D(filters=64,kernel_size=3,strides=1,padding='same',activation='relu')(x)
x = Conv2D(filters=192,kernel_size=3,strides=1,padding='same',activation='relu')(x)
x = MaxPool2D(pool_size=3,strides=2,padding='same')(x)

x = inception_block(x,[64,96,128,16,32,32])
x = inception_block(x,[64,96,128,16,32,32])
x = inception_block(x,[128,128,192,32,96,64])
x = inception_block(x,[128,128,192,32,96,64])
x = MaxPool2D(pool_size=3,strides=2,padding='same')(x)

x = inception_block(x,[192,96,208,16,48,64])
x = inception_block(x,[192,96,208,16,48,64])
x = inception_block(x,[160,112,224,24,64,64])
x = inception_block(x,[160,112,224,24,64,64])
x = inception_block(x,[128,128,256,24,64,64])
x = inception_block(x,[128,128,256,24,64,64])
x = inception_block(x,[112,144,288,32,64,64])
x = inception_block(x,[112,144,288,32,64,64])
x = inception_block(x,[256,160,320,32,128,128])
x = inception_block(x,[256,160,320,32,128,128])
x = MaxPool2D(pool_size=3,strides=2,padding='same')(x)

x = inception_block(x,[256,160,320,32,128,128])
x = inception_block(x,[256,160,320,32,128,128])
x = inception_block(x,[384,192,384,48,128,128])
x = inception_block(x,[384,192,384,48,128,128])
x = AvgPool2D(pool_size=7,strides=1)(x)
x = Dropout(rate=0.4)(x)
output = Dense(units=1000,activation="softmax")(x)

model = Model(input,output)
model.summary()


'''
/usr/local/bin/python3.6 /Users/liushuang/PycharmProjects/LS_Test/main.py
Using TensorFlow backend.
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.
__________________________________________________________________________________________________
Layer (type)                    Output Shape         Param #     Connected to                     
==================================================================================================
input_1 (InputLayer)            (None, 224, 224, 3)  0                                            
__________________________________________________________________________________________________
conv2d_1 (Conv2D)               (None, 112, 112, 64) 9472        input_1[0][0]                    
__________________________________________________________________________________________________
max_pooling2d_1 (MaxPooling2D)  (None, 56, 56, 64)   0           conv2d_1[0][0]                   
__________________________________________________________________________________________________
conv2d_2 (Conv2D)               (None, 56, 56, 64)   36928       max_pooling2d_1[0][0]            
__________________________________________________________________________________________________
conv2d_3 (Conv2D)               (None, 56, 56, 192)  110784      conv2d_2[0][0]                   
__________________________________________________________________________________________________
max_pooling2d_2 (MaxPooling2D)  (None, 28, 28, 192)  0           conv2d_3[0][0]                   
__________________________________________________________________________________________________
conv2d_5 (Conv2D)               (None, 28, 28, 96)   18528       max_pooling2d_2[0][0]            
__________________________________________________________________________________________________
conv2d_7 (Conv2D)               (None, 28, 28, 16)   3088        max_pooling2d_2[0][0]            
__________________________________________________________________________________________________
max_pooling2d_3 (MaxPooling2D)  (None, 28, 28, 192)  0           max_pooling2d_2[0][0]            
__________________________________________________________________________________________________
conv2d_4 (Conv2D)               (None, 28, 28, 64)   12352       max_pooling2d_2[0][0]            
__________________________________________________________________________________________________
conv2d_6 (Conv2D)               (None, 28, 28, 128)  110720      conv2d_5[0][0]                   
__________________________________________________________________________________________________
conv2d_8 (Conv2D)               (None, 28, 28, 32)   12832       conv2d_7[0][0]                   
__________________________________________________________________________________________________
conv2d_9 (Conv2D)               (None, 28, 28, 32)   6176        max_pooling2d_3[0][0]            
__________________________________________________________________________________________________
concatenate_1 (Concatenate)     (None, 28, 28, 256)  0           conv2d_4[0][0]                   
                                                                 conv2d_6[0][0]                   
                                                                 conv2d_8[0][0]                   
                                                                 conv2d_9[0][0]                   
__________________________________________________________________________________________________
conv2d_11 (Conv2D)              (None, 28, 28, 96)   24672       concatenate_1[0][0]              
__________________________________________________________________________________________________
conv2d_13 (Conv2D)              (None, 28, 28, 16)   4112        concatenate_1[0][0]              
__________________________________________________________________________________________________
max_pooling2d_4 (MaxPooling2D)  (None, 28, 28, 256)  0           concatenate_1[0][0]              
__________________________________________________________________________________________________
conv2d_10 (Conv2D)              (None, 28, 28, 64)   16448       concatenate_1[0][0]              
__________________________________________________________________________________________________
conv2d_12 (Conv2D)              (None, 28, 28, 128)  110720      conv2d_11[0][0]                  
__________________________________________________________________________________________________
conv2d_14 (Conv2D)              (None, 28, 28, 32)   12832       conv2d_13[0][0]                  
__________________________________________________________________________________________________
conv2d_15 (Conv2D)              (None, 28, 28, 32)   8224        max_pooling2d_4[0][0]            
__________________________________________________________________________________________________
concatenate_2 (Concatenate)     (None, 28, 28, 256)  0           conv2d_10[0][0]                  
                                                                 conv2d_12[0][0]                  
                                                                 conv2d_14[0][0]                  
                                                                 conv2d_15[0][0]                  
__________________________________________________________________________________________________
conv2d_17 (Conv2D)              (None, 28, 28, 128)  32896       concatenate_2[0][0]              
__________________________________________________________________________________________________
conv2d_19 (Conv2D)              (None, 28, 28, 32)   8224        concatenate_2[0][0]              
__________________________________________________________________________________________________
max_pooling2d_5 (MaxPooling2D)  (None, 28, 28, 256)  0           concatenate_2[0][0]              
__________________________________________________________________________________________________
conv2d_16 (Conv2D)              (None, 28, 28, 128)  32896       concatenate_2[0][0]              
__________________________________________________________________________________________________
conv2d_18 (Conv2D)              (None, 28, 28, 192)  221376      conv2d_17[0][0]                  
__________________________________________________________________________________________________
conv2d_20 (Conv2D)              (None, 28, 28, 96)   76896       conv2d_19[0][0]                  
__________________________________________________________________________________________________
conv2d_21 (Conv2D)              (None, 28, 28, 64)   16448       max_pooling2d_5[0][0]            
__________________________________________________________________________________________________
concatenate_3 (Concatenate)     (None, 28, 28, 480)  0           conv2d_16[0][0]                  
                                                                 conv2d_18[0][0]                  
                                                                 conv2d_20[0][0]                  
                                                                 conv2d_21[0][0]                  
__________________________________________________________________________________________________
conv2d_23 (Conv2D)              (None, 28, 28, 128)  61568       concatenate_3[0][0]              
__________________________________________________________________________________________________
conv2d_25 (Conv2D)              (None, 28, 28, 32)   15392       concatenate_3[0][0]              
__________________________________________________________________________________________________
max_pooling2d_6 (MaxPooling2D)  (None, 28, 28, 480)  0           concatenate_3[0][0]              
__________________________________________________________________________________________________
conv2d_22 (Conv2D)              (None, 28, 28, 128)  61568       concatenate_3[0][0]              
__________________________________________________________________________________________________
conv2d_24 (Conv2D)              (None, 28, 28, 192)  221376      conv2d_23[0][0]                  
__________________________________________________________________________________________________
conv2d_26 (Conv2D)              (None, 28, 28, 96)   76896       conv2d_25[0][0]                  
__________________________________________________________________________________________________
conv2d_27 (Conv2D)              (None, 28, 28, 64)   30784       max_pooling2d_6[0][0]            
__________________________________________________________________________________________________
concatenate_4 (Concatenate)     (None, 28, 28, 480)  0           conv2d_22[0][0]                  
                                                                 conv2d_24[0][0]                  
                                                                 conv2d_26[0][0]                  
                                                                 conv2d_27[0][0]                  
__________________________________________________________________________________________________
max_pooling2d_7 (MaxPooling2D)  (None, 14, 14, 480)  0           concatenate_4[0][0]              
__________________________________________________________________________________________________
conv2d_29 (Conv2D)              (None, 14, 14, 96)   46176       max_pooling2d_7[0][0]            
__________________________________________________________________________________________________
conv2d_31 (Conv2D)              (None, 14, 14, 16)   7696        max_pooling2d_7[0][0]            
__________________________________________________________________________________________________
max_pooling2d_8 (MaxPooling2D)  (None, 14, 14, 480)  0           max_pooling2d_7[0][0]            
__________________________________________________________________________________________________
conv2d_28 (Conv2D)              (None, 14, 14, 192)  92352       max_pooling2d_7[0][0]            
__________________________________________________________________________________________________
conv2d_30 (Conv2D)              (None, 14, 14, 208)  179920      conv2d_29[0][0]                  
__________________________________________________________________________________________________
conv2d_32 (Conv2D)              (None, 14, 14, 48)   19248       conv2d_31[0][0]                  
__________________________________________________________________________________________________
conv2d_33 (Conv2D)              (None, 14, 14, 64)   30784       max_pooling2d_8[0][0]            
__________________________________________________________________________________________________
concatenate_5 (Concatenate)     (None, 14, 14, 512)  0           conv2d_28[0][0]                  
                                                                 conv2d_30[0][0]                  
                                                                 conv2d_32[0][0]                  
                                                                 conv2d_33[0][0]                  
__________________________________________________________________________________________________
conv2d_35 (Conv2D)              (None, 14, 14, 96)   49248       concatenate_5[0][0]              
__________________________________________________________________________________________________
conv2d_37 (Conv2D)              (None, 14, 14, 16)   8208        concatenate_5[0][0]              
__________________________________________________________________________________________________
max_pooling2d_9 (MaxPooling2D)  (None, 14, 14, 512)  0           concatenate_5[0][0]              
__________________________________________________________________________________________________
conv2d_34 (Conv2D)              (None, 14, 14, 192)  98496       concatenate_5[0][0]              
__________________________________________________________________________________________________
conv2d_36 (Conv2D)              (None, 14, 14, 208)  179920      conv2d_35[0][0]                  
__________________________________________________________________________________________________
conv2d_38 (Conv2D)              (None, 14, 14, 48)   19248       conv2d_37[0][0]                  
__________________________________________________________________________________________________
conv2d_39 (Conv2D)              (None, 14, 14, 64)   32832       max_pooling2d_9[0][0]            
__________________________________________________________________________________________________
concatenate_6 (Concatenate)     (None, 14, 14, 512)  0           conv2d_34[0][0]                  
                                                                 conv2d_36[0][0]                  
                                                                 conv2d_38[0][0]                  
                                                                 conv2d_39[0][0]                  
__________________________________________________________________________________________________
conv2d_41 (Conv2D)              (None, 14, 14, 112)  57456       concatenate_6[0][0]              
__________________________________________________________________________________________________
conv2d_43 (Conv2D)              (None, 14, 14, 24)   12312       concatenate_6[0][0]              
__________________________________________________________________________________________________
max_pooling2d_10 (MaxPooling2D) (None, 14, 14, 512)  0           concatenate_6[0][0]              
__________________________________________________________________________________________________
conv2d_40 (Conv2D)              (None, 14, 14, 160)  82080       concatenate_6[0][0]              
__________________________________________________________________________________________________
conv2d_42 (Conv2D)              (None, 14, 14, 224)  226016      conv2d_41[0][0]                  
__________________________________________________________________________________________________
conv2d_44 (Conv2D)              (None, 14, 14, 64)   38464       conv2d_43[0][0]                  
__________________________________________________________________________________________________
conv2d_45 (Conv2D)              (None, 14, 14, 64)   32832       max_pooling2d_10[0][0]           
__________________________________________________________________________________________________
concatenate_7 (Concatenate)     (None, 14, 14, 512)  0           conv2d_40[0][0]                  
                                                                 conv2d_42[0][0]                  
                                                                 conv2d_44[0][0]                  
                                                                 conv2d_45[0][0]                  
__________________________________________________________________________________________________
conv2d_47 (Conv2D)              (None, 14, 14, 112)  57456       concatenate_7[0][0]              
__________________________________________________________________________________________________
conv2d_49 (Conv2D)              (None, 14, 14, 24)   12312       concatenate_7[0][0]              
__________________________________________________________________________________________________
max_pooling2d_11 (MaxPooling2D) (None, 14, 14, 512)  0           concatenate_7[0][0]              
__________________________________________________________________________________________________
conv2d_46 (Conv2D)              (None, 14, 14, 160)  82080       concatenate_7[0][0]              
__________________________________________________________________________________________________
conv2d_48 (Conv2D)              (None, 14, 14, 224)  226016      conv2d_47[0][0]                  
__________________________________________________________________________________________________
conv2d_50 (Conv2D)              (None, 14, 14, 64)   38464       conv2d_49[0][0]                  
__________________________________________________________________________________________________
conv2d_51 (Conv2D)              (None, 14, 14, 64)   32832       max_pooling2d_11[0][0]           
__________________________________________________________________________________________________
concatenate_8 (Concatenate)     (None, 14, 14, 512)  0           conv2d_46[0][0]                  
                                                                 conv2d_48[0][0]                  
                                                                 conv2d_50[0][0]                  
                                                                 conv2d_51[0][0]                  
__________________________________________________________________________________________________
conv2d_53 (Conv2D)              (None, 14, 14, 128)  65664       concatenate_8[0][0]              
__________________________________________________________________________________________________
conv2d_55 (Conv2D)              (None, 14, 14, 24)   12312       concatenate_8[0][0]              
__________________________________________________________________________________________________
max_pooling2d_12 (MaxPooling2D) (None, 14, 14, 512)  0           concatenate_8[0][0]              
__________________________________________________________________________________________________
conv2d_52 (Conv2D)              (None, 14, 14, 128)  65664       concatenate_8[0][0]              
__________________________________________________________________________________________________
conv2d_54 (Conv2D)              (None, 14, 14, 256)  295168      conv2d_53[0][0]                  
__________________________________________________________________________________________________
conv2d_56 (Conv2D)              (None, 14, 14, 64)   38464       conv2d_55[0][0]                  
__________________________________________________________________________________________________
conv2d_57 (Conv2D)              (None, 14, 14, 64)   32832       max_pooling2d_12[0][0]           
__________________________________________________________________________________________________
concatenate_9 (Concatenate)     (None, 14, 14, 512)  0           conv2d_52[0][0]                  
                                                                 conv2d_54[0][0]                  
                                                                 conv2d_56[0][0]                  
                                                                 conv2d_57[0][0]                  
__________________________________________________________________________________________________
conv2d_59 (Conv2D)              (None, 14, 14, 128)  65664       concatenate_9[0][0]              
__________________________________________________________________________________________________
conv2d_61 (Conv2D)              (None, 14, 14, 24)   12312       concatenate_9[0][0]              
__________________________________________________________________________________________________
max_pooling2d_13 (MaxPooling2D) (None, 14, 14, 512)  0           concatenate_9[0][0]              
__________________________________________________________________________________________________
conv2d_58 (Conv2D)              (None, 14, 14, 128)  65664       concatenate_9[0][0]              
__________________________________________________________________________________________________
conv2d_60 (Conv2D)              (None, 14, 14, 256)  295168      conv2d_59[0][0]                  
__________________________________________________________________________________________________
conv2d_62 (Conv2D)              (None, 14, 14, 64)   38464       conv2d_61[0][0]                  
__________________________________________________________________________________________________
conv2d_63 (Conv2D)              (None, 14, 14, 64)   32832       max_pooling2d_13[0][0]           
__________________________________________________________________________________________________
concatenate_10 (Concatenate)    (None, 14, 14, 512)  0           conv2d_58[0][0]                  
                                                                 conv2d_60[0][0]                  
                                                                 conv2d_62[0][0]                  
                                                                 conv2d_63[0][0]                  
__________________________________________________________________________________________________
conv2d_65 (Conv2D)              (None, 14, 14, 144)  73872       concatenate_10[0][0]             
__________________________________________________________________________________________________
conv2d_67 (Conv2D)              (None, 14, 14, 32)   16416       concatenate_10[0][0]             
__________________________________________________________________________________________________
max_pooling2d_14 (MaxPooling2D) (None, 14, 14, 512)  0           concatenate_10[0][0]             
__________________________________________________________________________________________________
conv2d_64 (Conv2D)              (None, 14, 14, 112)  57456       concatenate_10[0][0]             
__________________________________________________________________________________________________
conv2d_66 (Conv2D)              (None, 14, 14, 288)  373536      conv2d_65[0][0]                  
__________________________________________________________________________________________________
conv2d_68 (Conv2D)              (None, 14, 14, 64)   51264       conv2d_67[0][0]                  
__________________________________________________________________________________________________
conv2d_69 (Conv2D)              (None, 14, 14, 64)   32832       max_pooling2d_14[0][0]           
__________________________________________________________________________________________________
concatenate_11 (Concatenate)    (None, 14, 14, 528)  0           conv2d_64[0][0]                  
                                                                 conv2d_66[0][0]                  
                                                                 conv2d_68[0][0]                  
                                                                 conv2d_69[0][0]                  
__________________________________________________________________________________________________
conv2d_71 (Conv2D)              (None, 14, 14, 144)  76176       concatenate_11[0][0]             
__________________________________________________________________________________________________
conv2d_73 (Conv2D)              (None, 14, 14, 32)   16928       concatenate_11[0][0]             
__________________________________________________________________________________________________
max_pooling2d_15 (MaxPooling2D) (None, 14, 14, 528)  0           concatenate_11[0][0]             
__________________________________________________________________________________________________
conv2d_70 (Conv2D)              (None, 14, 14, 112)  59248       concatenate_11[0][0]             
__________________________________________________________________________________________________
conv2d_72 (Conv2D)              (None, 14, 14, 288)  373536      conv2d_71[0][0]                  
__________________________________________________________________________________________________
conv2d_74 (Conv2D)              (None, 14, 14, 64)   51264       conv2d_73[0][0]                  
__________________________________________________________________________________________________
conv2d_75 (Conv2D)              (None, 14, 14, 64)   33856       max_pooling2d_15[0][0]           
__________________________________________________________________________________________________
concatenate_12 (Concatenate)    (None, 14, 14, 528)  0           conv2d_70[0][0]                  
                                                                 conv2d_72[0][0]                  
                                                                 conv2d_74[0][0]                  
                                                                 conv2d_75[0][0]                  
__________________________________________________________________________________________________
conv2d_77 (Conv2D)              (None, 14, 14, 160)  84640       concatenate_12[0][0]             
__________________________________________________________________________________________________
conv2d_79 (Conv2D)              (None, 14, 14, 32)   16928       concatenate_12[0][0]             
__________________________________________________________________________________________________
max_pooling2d_16 (MaxPooling2D) (None, 14, 14, 528)  0           concatenate_12[0][0]             
__________________________________________________________________________________________________
conv2d_76 (Conv2D)              (None, 14, 14, 256)  135424      concatenate_12[0][0]             
__________________________________________________________________________________________________
conv2d_78 (Conv2D)              (None, 14, 14, 320)  461120      conv2d_77[0][0]                  
__________________________________________________________________________________________________
conv2d_80 (Conv2D)              (None, 14, 14, 128)  102528      conv2d_79[0][0]                  
__________________________________________________________________________________________________
conv2d_81 (Conv2D)              (None, 14, 14, 128)  67712       max_pooling2d_16[0][0]           
__________________________________________________________________________________________________
concatenate_13 (Concatenate)    (None, 14, 14, 832)  0           conv2d_76[0][0]                  
                                                                 conv2d_78[0][0]                  
                                                                 conv2d_80[0][0]                  
                                                                 conv2d_81[0][0]                  
__________________________________________________________________________________________________
conv2d_83 (Conv2D)              (None, 14, 14, 160)  133280      concatenate_13[0][0]             
__________________________________________________________________________________________________
conv2d_85 (Conv2D)              (None, 14, 14, 32)   26656       concatenate_13[0][0]             
__________________________________________________________________________________________________
max_pooling2d_17 (MaxPooling2D) (None, 14, 14, 832)  0           concatenate_13[0][0]             
__________________________________________________________________________________________________
conv2d_82 (Conv2D)              (None, 14, 14, 256)  213248      concatenate_13[0][0]             
__________________________________________________________________________________________________
conv2d_84 (Conv2D)              (None, 14, 14, 320)  461120      conv2d_83[0][0]                  
__________________________________________________________________________________________________
conv2d_86 (Conv2D)              (None, 14, 14, 128)  102528      conv2d_85[0][0]                  
__________________________________________________________________________________________________
conv2d_87 (Conv2D)              (None, 14, 14, 128)  106624      max_pooling2d_17[0][0]           
__________________________________________________________________________________________________
concatenate_14 (Concatenate)    (None, 14, 14, 832)  0           conv2d_82[0][0]                  
                                                                 conv2d_84[0][0]                  
                                                                 conv2d_86[0][0]                  
                                                                 conv2d_87[0][0]                  
__________________________________________________________________________________________________
max_pooling2d_18 (MaxPooling2D) (None, 7, 7, 832)    0           concatenate_14[0][0]             
__________________________________________________________________________________________________
conv2d_89 (Conv2D)              (None, 7, 7, 160)    133280      max_pooling2d_18[0][0]           
__________________________________________________________________________________________________
conv2d_91 (Conv2D)              (None, 7, 7, 32)     26656       max_pooling2d_18[0][0]           
__________________________________________________________________________________________________
max_pooling2d_19 (MaxPooling2D) (None, 7, 7, 832)    0           max_pooling2d_18[0][0]           
__________________________________________________________________________________________________
conv2d_88 (Conv2D)              (None, 7, 7, 256)    213248      max_pooling2d_18[0][0]           
__________________________________________________________________________________________________
conv2d_90 (Conv2D)              (None, 7, 7, 320)    461120      conv2d_89[0][0]                  
__________________________________________________________________________________________________
conv2d_92 (Conv2D)              (None, 7, 7, 128)    102528      conv2d_91[0][0]                  
__________________________________________________________________________________________________
conv2d_93 (Conv2D)              (None, 7, 7, 128)    106624      max_pooling2d_19[0][0]           
__________________________________________________________________________________________________
concatenate_15 (Concatenate)    (None, 7, 7, 832)    0           conv2d_88[0][0]                  
                                                                 conv2d_90[0][0]                  
                                                                 conv2d_92[0][0]                  
                                                                 conv2d_93[0][0]                  
__________________________________________________________________________________________________
conv2d_95 (Conv2D)              (None, 7, 7, 160)    133280      concatenate_15[0][0]             
__________________________________________________________________________________________________
conv2d_97 (Conv2D)              (None, 7, 7, 32)     26656       concatenate_15[0][0]             
__________________________________________________________________________________________________
max_pooling2d_20 (MaxPooling2D) (None, 7, 7, 832)    0           concatenate_15[0][0]             
__________________________________________________________________________________________________
conv2d_94 (Conv2D)              (None, 7, 7, 256)    213248      concatenate_15[0][0]             
__________________________________________________________________________________________________
conv2d_96 (Conv2D)              (None, 7, 7, 320)    461120      conv2d_95[0][0]                  
__________________________________________________________________________________________________
conv2d_98 (Conv2D)              (None, 7, 7, 128)    102528      conv2d_97[0][0]                  
__________________________________________________________________________________________________
conv2d_99 (Conv2D)              (None, 7, 7, 128)    106624      max_pooling2d_20[0][0]           
__________________________________________________________________________________________________
concatenate_16 (Concatenate)    (None, 7, 7, 832)    0           conv2d_94[0][0]                  
                                                                 conv2d_96[0][0]                  
                                                                 conv2d_98[0][0]                  
                                                                 conv2d_99[0][0]                  
__________________________________________________________________________________________________
conv2d_101 (Conv2D)             (None, 7, 7, 192)    159936      concatenate_16[0][0]             
__________________________________________________________________________________________________
conv2d_103 (Conv2D)             (None, 7, 7, 48)     39984       concatenate_16[0][0]             
__________________________________________________________________________________________________
max_pooling2d_21 (MaxPooling2D) (None, 7, 7, 832)    0           concatenate_16[0][0]             
__________________________________________________________________________________________________
conv2d_100 (Conv2D)             (None, 7, 7, 384)    319872      concatenate_16[0][0]             
__________________________________________________________________________________________________
conv2d_102 (Conv2D)             (None, 7, 7, 384)    663936      conv2d_101[0][0]                 
__________________________________________________________________________________________________
conv2d_104 (Conv2D)             (None, 7, 7, 128)    153728      conv2d_103[0][0]                 
__________________________________________________________________________________________________
conv2d_105 (Conv2D)             (None, 7, 7, 128)    106624      max_pooling2d_21[0][0]           
__________________________________________________________________________________________________
concatenate_17 (Concatenate)    (None, 7, 7, 1024)   0           conv2d_100[0][0]                 
                                                                 conv2d_102[0][0]                 
                                                                 conv2d_104[0][0]                 
                                                                 conv2d_105[0][0]                 
__________________________________________________________________________________________________
conv2d_107 (Conv2D)             (None, 7, 7, 192)    196800      concatenate_17[0][0]             
__________________________________________________________________________________________________
conv2d_109 (Conv2D)             (None, 7, 7, 48)     49200       concatenate_17[0][0]             
__________________________________________________________________________________________________
max_pooling2d_22 (MaxPooling2D) (None, 7, 7, 1024)   0           concatenate_17[0][0]             
__________________________________________________________________________________________________
conv2d_106 (Conv2D)             (None, 7, 7, 384)    393600      concatenate_17[0][0]             
__________________________________________________________________________________________________
conv2d_108 (Conv2D)             (None, 7, 7, 384)    663936      conv2d_107[0][0]                 
__________________________________________________________________________________________________
conv2d_110 (Conv2D)             (None, 7, 7, 128)    153728      conv2d_109[0][0]                 
__________________________________________________________________________________________________
conv2d_111 (Conv2D)             (None, 7, 7, 128)    131200      max_pooling2d_22[0][0]           
__________________________________________________________________________________________________
concatenate_18 (Concatenate)    (None, 7, 7, 1024)   0           conv2d_106[0][0]                 
                                                                 conv2d_108[0][0]                 
                                                                 conv2d_110[0][0]                 
                                                                 conv2d_111[0][0]                 
__________________________________________________________________________________________________
average_pooling2d_1 (AveragePoo (None, 1, 1, 1024)   0           concatenate_18[0][0]             
__________________________________________________________________________________________________
dropout_1 (Dropout)             (None, 1, 1, 1024)   0           average_pooling2d_1[0][0]        
__________________________________________________________________________________________________
dense_1 (Dense)                 (None, 1, 1, 1000)   1025000     dropout_1[0][0]                  
==================================================================================================
Total params: 13,309,512
Trainable params: 13,309,512
Non-trainable params: 0
__________________________________________________________________________________________________

Process finished with exit code 0


'''

你可能感兴趣的:(计算机视觉)