Browse Source

Update of script nn order

jbuisine 3 years ago
parent
commit
325b764f58
2 changed files with 7 additions and 7 deletions
  1. 5 5
      classification_cnn_keras_svd.py
  2. 2 2
      run.sh

+ 5 - 5
classification_cnn_keras_svd.py

@@ -65,17 +65,17 @@ def generate_model():
 
     model = Sequential()
 
-    model.add(Conv2D(100, (2, 1), input_shape=input_shape))
+    model.add(Conv2D(20, (2, 1), input_shape=input_shape))
     model.add(Activation('relu'))
     model.add(MaxPooling2D(pool_size=(2, 1)))
 
-    model.add(Conv2D(80, (2, 1)))
+    '''model.add(Conv2D(80, (2, 1)))
     model.add(Activation('relu'))
-    model.add(AveragePooling2D(pool_size=(2, 1)))
+    model.add(MaxPooling2D(pool_size=(2, 1)))
 
-    model.add(Conv2D(50, (2, 1)))
+    model.add(Conv2D(20, (2, 1)))
     model.add(Activation('relu'))
-    model.add(MaxPooling2D(pool_size=(2, 1)))
+    model.add(MaxPooling2D(pool_size=(2, 1)))'''
 
     model.add(Flatten())
     model.add(Dense(50, kernel_regularizer=l2(0.01)))

+ 2 - 2
run.sh

@@ -3,9 +3,9 @@
 size=$1
 
 if [ -z ${size} ]; then
-  echo "Run algorithms with image of size ${size}.."
-else 
   echo "Need size parameter : ./run.sh 20"; 
+else 
+  echo "Run algorithms with image of size ${size}.."
 fi
 
 python classification_cnn_keras.py --directory ../models/$size/ --output cnn_model --batch_size 32 --epochs 150 --img $size