调整现有的卷积神经网络模型以用于更大的图像

时间:2016-12-02 17:59:35

标签: deep-learning keras conv-neural-network

我正在调整围绕CIFAR-10数据集设计的CNN模型。

CIFAR-10中的图像为32x32。我的数据集具有不规则形状的图像,192x108。

初始卷积层有32个过滤器和3x3内核大小,在后续层上增加到64,然后增加到128.

如果图像尺寸增加,最好增加滤镜数量和/或内核大小吗?如果是这样,我应该使用哪种启发式方法?

内核是否需要保持对称?

以下是我的模型定义:

Using TensorFlow backend.
____________________________________________________________________________________________________
Layer (type)                     Output Shape          Param #     Connected to                     
====================================================================================================
convolution2d_1 (Convolution2D)  (None, 32, 192, 108)  896         convolution2d_input_1[0][0]      
____________________________________________________________________________________________________
dropout_1 (Dropout)              (None, 32, 192, 108)  0           convolution2d_1[0][0]            
____________________________________________________________________________________________________
convolution2d_2 (Convolution2D)  (None, 32, 192, 108)  9248        dropout_1[0][0]                  
____________________________________________________________________________________________________
maxpooling2d_1 (MaxPooling2D)    (None, 32, 96, 54)    0           convolution2d_2[0][0]            
____________________________________________________________________________________________________
convolution2d_3 (Convolution2D)  (None, 64, 96, 54)    18496       maxpooling2d_1[0][0]             
____________________________________________________________________________________________________
dropout_2 (Dropout)              (None, 64, 96, 54)    0           convolution2d_3[0][0]            
____________________________________________________________________________________________________
convolution2d_4 (Convolution2D)  (None, 64, 96, 54)    36928       dropout_2[0][0]                  
____________________________________________________________________________________________________
maxpooling2d_2 (MaxPooling2D)    (None, 64, 48, 27)    0           convolution2d_4[0][0]            
____________________________________________________________________________________________________
convolution2d_5 (Convolution2D)  (None, 128, 48, 27)   73856       maxpooling2d_2[0][0]             
____________________________________________________________________________________________________
dropout_3 (Dropout)              (None, 128, 48, 27)   0           convolution2d_5[0][0]            
____________________________________________________________________________________________________
convolution2d_6 (Convolution2D)  (None, 128, 48, 27)   147584      dropout_3[0][0]                  
____________________________________________________________________________________________________
maxpooling2d_3 (MaxPooling2D)    (None, 128, 24, 13)   0           convolution2d_6[0][0]            
____________________________________________________________________________________________________
flatten_1 (Flatten)              (None, 39936)         0           maxpooling2d_3[0][0]             
____________________________________________________________________________________________________
dropout_4 (Dropout)              (None, 39936)         0           flatten_1[0][0]                  
____________________________________________________________________________________________________
dense_1 (Dense)                  (None, 1024)          40895488    dropout_4[0][0]                  
____________________________________________________________________________________________________
dropout_5 (Dropout)              (None, 1024)          0           dense_1[0][0]                    
____________________________________________________________________________________________________
dense_2 (Dense)                  (None, 512)           524800      dropout_5[0][0]                  
____________________________________________________________________________________________________
dropout_6 (Dropout)              (None, 512)           0           dense_2[0][0]                    
____________________________________________________________________________________________________
dense_3 (Dense)                  (None, 3)             1539        dropout_6[0][0]                  
====================================================================================================
Total params: 41708835

0 个答案:

没有答案