Browse Source

Update of model

Jerome Buisine 3 years ago
parent
commit
ea2408c247
1 changed files with 3 additions and 21 deletions
  1. 3 21
      classification_cnn_keras_svd_img.py

+ 3 - 21
classification_cnn_keras_svd_img.py

@@ -101,41 +101,23 @@ def generate_model():
 
     model = Sequential()
 
-    model.add(Conv2D(100, (2, 2), input_shape=input_shape))
+    model.add(Conv2D(50, (2, 2), input_shape=input_shape))
     model.add(Activation('relu'))
     model.add(BatchNormalization())
     model.add(MaxPooling2D(pool_size=(2, 2)))
 
-    model.add(Conv2D(60, (2, 2), input_shape=input_shape))
-    model.add(Activation('relu'))
-    model.add(BatchNormalization())
-    model.add(MaxPooling2D(pool_size=(2, 2)))
-
-    model.add(Conv2D(40, (2, 2)))
-    model.add(Activation('relu'))
-    model.add(MaxPooling2D(pool_size=(2, 2)))
-
     model.add(Conv2D(30, (2, 2)))
     model.add(Activation('relu'))
     model.add(MaxPooling2D(pool_size=(2, 2)))
 
     model.add(Flatten())
-    model.add(Dense(150, kernel_regularizer=l2(0.01)))
-    model.add(BatchNormalization())
-    model.add(Activation('relu'))
-    model.add(Dropout(0.2))
-
-    model.add(Dense(120, kernel_regularizer=l2(0.01)))
-    model.add(BatchNormalization())
-    model.add(Activation('relu'))
-    model.add(Dropout(0.2))
 
-    model.add(Dense(80, kernel_regularizer=l2(0.01)))
+    model.add(Dense(100, kernel_regularizer=l2(0.01)))
     model.add(BatchNormalization())
     model.add(Activation('relu'))
     model.add(Dropout(0.2))
 
-    model.add(Dense(40, kernel_regularizer=l2(0.01)))
+    model.add(Dense(100, kernel_regularizer=l2(0.01)))
     model.add(BatchNormalization())
     model.add(Activation('relu'))
     model.add(Dropout(0.2))