Commit 398c7dc9 authored by Ard Kastrati's avatar Ard Kastrati
Browse files

Added the results of CNN

parent db2492e5
......@@ -61,14 +61,14 @@ class Classifier_CNN:
model.compile(loss='binary_crossentropy', optimizer=keras.optimizers.Adam(), metrics=['accuracy'])
return model
def _CNN_module(self, input_tensor, nb_filters=128, activation='linear'):
x = tf.keras.layers.Conv1D(filters=nb_filters, kernel_size=128, padding='same', activation=activation, use_bias=False)(input_tensor)
def _CNN_module(self, input_tensor, nb_filters=128, kernel_size=5, activation='linear'):
x = tf.keras.layers.Conv1D(filters=nb_filters, kernel_size=kernel_size, padding='same', activation=activation, use_bias=False)(input_tensor)
x = tf.keras.layers.BatchNormalization()(x)
x = tf.keras.layers.Activation(activation='relu')(x)
x = tf.keras.layers.MaxPool1D()(x)
return x
def _build_model(self, input_shape, X=[], depth=6):
def _build_model(self, input_shape, X=[], depth=3):
if config['split']:
input_layer = X
else:
......@@ -77,7 +77,7 @@ class Classifier_CNN:
x = input_layer
for d in range(depth):
x = self._CNN_module(x)
x = self._CNN_module(x, nb_filters=32*(d+1))
gap_layer = tf.keras.layers.GlobalAveragePooling1D()(x)
if config['split']:
......@@ -95,4 +95,4 @@ class Classifier_CNN:
mode='auto')
hist = self.model.fit(CNN_x, y, verbose=1, validation_split=0.2, epochs=35,
callbacks=[csv_logger, ckpt, early_stop])
return hist
return hist
\ No newline at end of file
......@@ -36,7 +36,7 @@ deepeye: Our method
# Choosing model
config['model'] = 'cnn'
config['downsampled'] = True
config['downsampled'] = False
config['split'] = True
config['cluster'] = clustering()
if config['split']:
......
epoch;accuracy;loss;val_accuracy;val_loss
0;0.5486575961112976;0.6903714537620544;0.5699102878570557;0.6792857646942139
1;0.6318241357803345;0.6411800384521484;0.63050377368927;0.6543213129043579
2;0.697563648223877;0.5742788910865784;0.5275362133979797;1.6303837299346924
3;0.7442542910575867;0.5123821496963501;0.754451334476471;0.5079358816146851
4;0.7881151437759399;0.4433583915233612;0.7387163639068604;0.5289912819862366
5;0.8271447420120239;0.37577152252197266;0.5436853170394897;0.7903388142585754
6;0.8566498756408691;0.32497984170913696;0.6902691721916199;0.5847141146659851
7;0.8775622844696045;0.2810709476470947;0.8401656150817871;0.3660678267478943
8;0.8961971402168274;0.24443283677101135;0.8452726006507874;0.3733794689178467
9;0.9083097577095032;0.21820437908172607;0.8383712768554688;0.40837687253952026
10;0.9202498197555542;0.1939115673303604;0.8636301159858704;0.3283298909664154
11;0.9283594489097595;0.1738947182893753;0.8626639246940613;0.3553672134876251
12;0.9376078248023987;0.15314865112304688;0.8694272041320801;0.35464149713516235
13;0.9435433745384216;0.1401693969964981;0.8437542915344238;0.4031431972980499
14;0.9492718577384949;0.1259995996952057;0.8630779981613159;0.35692331194877625
15;0.9574505090713501;0.11158707737922668;0.8245686888694763;0.5082063674926758
16;0.9582442045211792;0.10595446079969406;0.8766045570373535;0.33556005358695984
17;0.9645593166351318;0.09184840321540833;0.870669424533844;0.39911192655563354
18;0.9676996469497681;0.08439125120639801;0.8807453513145447;0.32254400849342346
19;0.9689764380455017;0.08015677332878113;0.5536231994628906;1.7334585189819336
20;0.9716681838035583;0.07457873970270157;0.8006901144981384;0.5176100134849548
21;0.9740147590637207;0.06920617073774338;0.8506556153297424;0.4671495854854584
22;0.9759817719459534;0.06408607214689255;0.8651483654975891;0.4298497438430786
23;0.9781558513641357;0.05866380035877228;0.7472739815711975;0.5979019999504089
24;0.9783629179000854;0.05672929808497429;0.6821256279945374;0.7269065976142883
25;0.978811502456665;0.05689336359500885;0.7823326587677002;0.5670095086097717
26;0.981434166431427;0.04897569864988327;0.8367149829864502;0.5116689205169678
27;0.9815031886100769;0.04934468865394592;0.7965493202209473;0.768904447555542
28;0.9835047125816345;0.04448374733328819;0.8095238208770752;0.5928476452827454
29;0.9831596612930298;0.04691381752490997;0.8841959834098816;0.4180179536342621
30;0.9848850965499878;0.04069218039512634;0.5312629342079163;1.402549147605896
31;0.9865415096282959;0.03638451173901558;0.8680469393730164;0.47490715980529785
32;0.9857823252677917;0.03875536844134331;0.8038647174835205;0.5669923424720764
33;0.9866450428962708;0.03573519363999367;0.8481711745262146;0.5169435143470764
34;0.9874042272567749;0.034723132848739624;0.8800551891326904;0.4361249506473541
best_model_train_loss,best_model_val_loss,best_model_train_acc,best_model_val_acc
0.04691381752490997,0.4180179536342621,0.9831596612930298,0.8841959834098816
loss,accuracy,val_loss,val_accuracy
0.6903714537620544,0.5486575961112976,0.6792857646942139,0.5699102878570557
0.6411800384521484,0.6318241357803345,0.6543213129043579,0.63050377368927
0.5742788910865784,0.697563648223877,1.6303837299346924,0.5275362133979797
0.5123821496963501,0.7442542910575867,0.5079358816146851,0.754451334476471
0.4433583915233612,0.7881151437759399,0.5289912819862366,0.7387163639068604
0.37577152252197266,0.8271447420120239,0.7903388142585754,0.5436853170394897
0.32497984170913696,0.8566498756408691,0.5847141146659851,0.6902691721916199
0.2810709476470947,0.8775622844696045,0.3660678267478943,0.8401656150817871
0.24443283677101135,0.8961971402168274,0.3733794689178467,0.8452726006507874
0.21820437908172607,0.9083097577095032,0.40837687253952026,0.8383712768554688
0.1939115673303604,0.9202498197555542,0.3283298909664154,0.8636301159858704
0.1738947182893753,0.9283594489097595,0.3553672134876251,0.8626639246940613
0.15314865112304688,0.9376078248023987,0.35464149713516235,0.8694272041320801
0.1401693969964981,0.9435433745384216,0.4031431972980499,0.8437542915344238
0.1259995996952057,0.9492718577384949,0.35692331194877625,0.8630779981613159
0.11158707737922668,0.9574505090713501,0.5082063674926758,0.8245686888694763
0.10595446079969406,0.9582442045211792,0.33556005358695984,0.8766045570373535
0.09184840321540833,0.9645593166351318,0.39911192655563354,0.870669424533844
0.08439125120639801,0.9676996469497681,0.32254400849342346,0.8807453513145447
0.08015677332878113,0.9689764380455017,1.7334585189819336,0.5536231994628906
0.07457873970270157,0.9716681838035583,0.5176100134849548,0.8006901144981384
0.06920617073774338,0.9740147590637207,0.4671495854854584,0.8506556153297424
0.06408607214689255,0.9759817719459534,0.4298497438430786,0.8651483654975891
0.05866380035877228,0.9781558513641357,0.5979019999504089,0.7472739815711975
0.05672929808497429,0.9783629179000854,0.7269065976142883,0.6821256279945374
0.05689336359500885,0.978811502456665,0.5670095086097717,0.7823326587677002
0.04897569864988327,0.981434166431427,0.5116689205169678,0.8367149829864502
0.04934468865394592,0.9815031886100769,0.768904447555542,0.7965493202209473
0.04448374733328819,0.9835047125816345,0.5928476452827454,0.8095238208770752
0.04691381752490997,0.9831596612930298,0.4180179536342621,0.8841959834098816
0.04069218039512634,0.9848850965499878,1.402549147605896,0.5312629342079163
0.03638451173901558,0.9865415096282959,0.47490715980529785,0.8680469393730164
0.03875536844134331,0.9857823252677917,0.5669923424720764,0.8038647174835205
0.03573519363999367,0.9866450428962708,0.5169435143470764,0.8481711745262146
0.034723132848739624,0.9874042272567749,0.4361249506473541,0.8800551891326904
INFO:root:Started the Logging
INFO:root:X training loaded.
INFO:root:(129, 500, 36223)
INFO:root:y training loaded.
INFO:root:(1, 36223)
INFO:root:Setting the shapes
INFO:root:(36223, 500, 129)
INFO:root:(36223, 1)
INFO:root:Started running CNN. If you want to run other methods please choose another model in the config.py file.
INFO:root:Starting CNN.
INFO:root:**********
INFO:root:--- Runtime: 1214.579668045044 seconds ---
INFO:root:Finished Logging
This diff is collapsed.
/Users/ardkastrati/Documents/DeepLearning/Project/GitLab/venv/bin/python /Users/ardkastrati/Documents/DeepLearning/DeepEye/main.py
Model: "model"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
input_1 (InputLayer) [(None, 500, 129)] 0
_________________________________________________________________
conv1d (Conv1D) (None, 500, 32) 20640
_________________________________________________________________
batch_normalization (BatchNo (None, 500, 32) 128
_________________________________________________________________
activation (Activation) (None, 500, 32) 0
_________________________________________________________________
max_pooling1d (MaxPooling1D) (None, 250, 32) 0
_________________________________________________________________
conv1d_1 (Conv1D) (None, 250, 64) 10240
_________________________________________________________________
batch_normalization_1 (Batch (None, 250, 64) 256
_________________________________________________________________
activation_1 (Activation) (None, 250, 64) 0
_________________________________________________________________
max_pooling1d_1 (MaxPooling1 (None, 125, 64) 0
_________________________________________________________________
conv1d_2 (Conv1D) (None, 125, 96) 30720
_________________________________________________________________
batch_normalization_2 (Batch (None, 125, 96) 384
_________________________________________________________________
activation_2 (Activation) (None, 125, 96) 0
_________________________________________________________________
max_pooling1d_2 (MaxPooling1 (None, 62, 96) 0
_________________________________________________________________
conv1d_3 (Conv1D) (None, 62, 128) 61440
_________________________________________________________________
batch_normalization_3 (Batch (None, 62, 128) 512
_________________________________________________________________
activation_3 (Activation) (None, 62, 128) 0
_________________________________________________________________
max_pooling1d_3 (MaxPooling1 (None, 31, 128) 0
_________________________________________________________________
conv1d_4 (Conv1D) (None, 31, 160) 102400
_________________________________________________________________
batch_normalization_4 (Batch (None, 31, 160) 640
_________________________________________________________________
activation_4 (Activation) (None, 31, 160) 0
_________________________________________________________________
max_pooling1d_4 (MaxPooling1 (None, 15, 160) 0
_________________________________________________________________
conv1d_5 (Conv1D) (None, 15, 192) 153600
_________________________________________________________________
batch_normalization_5 (Batch (None, 15, 192) 768
_________________________________________________________________
activation_5 (Activation) (None, 15, 192) 0
_________________________________________________________________
max_pooling1d_5 (MaxPooling1 (None, 7, 192) 0
_________________________________________________________________
global_average_pooling1d (Gl (None, 192) 0
_________________________________________________________________
dense (Dense) (None, 1) 193
=================================================================
Total params: 381,921
Trainable params: 380,577
Non-trainable params: 1,344
_________________________________________________________________
2021-01-10 15:19:28.338532: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)
Epoch 1/35
252/252 [==============================] - 34s 130ms/step - loss: 0.7246 - accuracy: 0.5334 - val_loss: 0.7542 - val_accuracy: 0.5052
Epoch 00001: val_accuracy improved from -inf to 0.50522, saving model to /Users/ardkastrati/Documents/DeepLearning/DeepEye/runs/1610288284_cnn/cnn_best_model.h5
Epoch 2/35
252/252 [==============================] - 24s 97ms/step - loss: 0.5018 - accuracy: 0.7581 - val_loss: 0.5243 - val_accuracy: 0.7452
Epoch 00002: val_accuracy improved from 0.50522 to 0.74516, saving model to /Users/ardkastrati/Documents/DeepLearning/DeepEye/runs/1610288284_cnn/cnn_best_model.h5
Epoch 3/35
252/252 [==============================] - 22s 89ms/step - loss: 0.3292 - accuracy: 0.8559 - val_loss: 0.7568 - val_accuracy: 0.6647
Epoch 00003: val_accuracy did not improve from 0.74516
Epoch 4/35
252/252 [==============================] - 21s 85ms/step - loss: 0.2221 - accuracy: 0.9154 - val_loss: 0.3330 - val_accuracy: 0.8490
Epoch 00004: val_accuracy improved from 0.74516 to 0.84898, saving model to /Users/ardkastrati/Documents/DeepLearning/DeepEye/runs/1610288284_cnn/cnn_best_model.h5
Epoch 5/35
252/252 [==============================] - 22s 86ms/step - loss: 0.1603 - accuracy: 0.9400 - val_loss: 0.3879 - val_accuracy: 0.8157
Epoch 00005: val_accuracy did not improve from 0.84898
Epoch 6/35
252/252 [==============================] - 21s 81ms/step - loss: 0.1198 - accuracy: 0.9600 - val_loss: 0.4619 - val_accuracy: 0.7859
Epoch 00006: val_accuracy did not improve from 0.84898
Epoch 7/35
252/252 [==============================] - 22s 87ms/step - loss: 0.0944 - accuracy: 0.9680 - val_loss: 0.3761 - val_accuracy: 0.8311
Epoch 00007: val_accuracy did not improve from 0.84898
Epoch 8/35
252/252 [==============================] - 21s 84ms/step - loss: 0.0736 - accuracy: 0.9714 - val_loss: 0.3810 - val_accuracy: 0.8410
Epoch 00008: val_accuracy did not improve from 0.84898
Epoch 9/35
252/252 [==============================] - 21s 84ms/step - loss: 0.0619 - accuracy: 0.9799 - val_loss: 0.3937 - val_accuracy: 0.8495
Epoch 00009: val_accuracy improved from 0.84898 to 0.84948, saving model to /Users/ardkastrati/Documents/DeepLearning/DeepEye/runs/1610288284_cnn/cnn_best_model.h5
Epoch 10/35
252/252 [==============================] - 22s 86ms/step - loss: 0.0397 - accuracy: 0.9868 - val_loss: 1.4127 - val_accuracy: 0.6299
Epoch 00010: val_accuracy did not improve from 0.84948
Epoch 11/35
252/252 [==============================] - 20s 80ms/step - loss: 0.0545 - accuracy: 0.9806 - val_loss: 0.4468 - val_accuracy: 0.8033
Epoch 00011: val_accuracy did not improve from 0.84948
Epoch 12/35
252/252 [==============================] - 20s 81ms/step - loss: 0.0420 - accuracy: 0.9857 - val_loss: 0.3191 - val_accuracy: 0.8713
Epoch 00012: val_accuracy improved from 0.84948 to 0.87134, saving model to /Users/ardkastrati/Documents/DeepLearning/DeepEye/runs/1610288284_cnn/cnn_best_model.h5
Epoch 13/35
252/252 [==============================] - 25s 98ms/step - loss: 0.0272 - accuracy: 0.9913 - val_loss: 0.3757 - val_accuracy: 0.8311
Epoch 00013: val_accuracy did not improve from 0.87134
Epoch 14/35
252/252 [==============================] - 25s 99ms/step - loss: 0.0244 - accuracy: 0.9926 - val_loss: 0.9223 - val_accuracy: 0.7024
Epoch 00014: val_accuracy did not improve from 0.87134
Epoch 15/35
252/252 [==============================] - 23s 90ms/step - loss: 0.0332 - accuracy: 0.9886 - val_loss: 1.5765 - val_accuracy: 0.6334
Epoch 00015: val_accuracy did not improve from 0.87134
Epoch 16/35
252/252 [==============================] - 21s 85ms/step - loss: 0.0247 - accuracy: 0.9923 - val_loss: 0.4619 - val_accuracy: 0.8400
Epoch 00016: val_accuracy did not improve from 0.87134
Epoch 17/35
252/252 [==============================] - 23s 90ms/step - loss: 0.0220 - accuracy: 0.9935 - val_loss: 0.3992 - val_accuracy: 0.8495
Epoch 00017: val_accuracy did not improve from 0.87134
Epoch 18/35
252/252 [==============================] - 21s 82ms/step - loss: 0.0218 - accuracy: 0.9917 - val_loss: 0.6358 - val_accuracy: 0.7407
Epoch 00018: val_accuracy did not improve from 0.87134
Epoch 19/35
252/252 [==============================] - 21s 84ms/step - loss: 0.0220 - accuracy: 0.9933 - val_loss: 0.7326 - val_accuracy: 0.8063
Epoch 00019: val_accuracy did not improve from 0.87134
Epoch 20/35
252/252 [==============================] - 20s 81ms/step - loss: 0.0318 - accuracy: 0.9874 - val_loss: 1.2289 - val_accuracy: 0.7134
Epoch 00020: val_accuracy did not improve from 0.87134
Epoch 21/35
252/252 [==============================] - 23s 93ms/step - loss: 0.0219 - accuracy: 0.9938 - val_loss: 0.3386 - val_accuracy: 0.8718
Epoch 00021: val_accuracy improved from 0.87134 to 0.87183, saving model to /Users/ardkastrati/Documents/DeepLearning/DeepEye/runs/1610288284_cnn/cnn_best_model.h5
Epoch 22/35
252/252 [==============================] - 23s 90ms/step - loss: 0.0118 - accuracy: 0.9984 - val_loss: 0.7714 - val_accuracy: 0.7422
Epoch 00022: val_accuracy did not improve from 0.87183
Epoch 23/35
252/252 [==============================] - 26s 104ms/step - loss: 0.0198 - accuracy: 0.9943 - val_loss: 0.8068 - val_accuracy: 0.7884
Epoch 00023: val_accuracy did not improve from 0.87183
Epoch 24/35
252/252 [==============================] - 21s 81ms/step - loss: 0.0265 - accuracy: 0.9904 - val_loss: 0.5154 - val_accuracy: 0.8092
Epoch 00024: val_accuracy did not improve from 0.87183
Epoch 25/35
252/252 [==============================] - 22s 86ms/step - loss: 0.0111 - accuracy: 0.9970 - val_loss: 0.6129 - val_accuracy: 0.7615
Epoch 00025: val_accuracy did not improve from 0.87183
Epoch 26/35
252/252 [==============================] - 21s 82ms/step - loss: 0.0251 - accuracy: 0.9918 - val_loss: 0.5523 - val_accuracy: 0.8356
Epoch 00026: val_accuracy did not improve from 0.87183
Epoch 27/35
252/252 [==============================] - 20s 80ms/step - loss: 0.0131 - accuracy: 0.9953 - val_loss: 0.4368 - val_accuracy: 0.8689
Epoch 00027: val_accuracy did not improve from 0.87183
Epoch 28/35
252/252 [==============================] - 24s 95ms/step - loss: 0.0074 - accuracy: 0.9985 - val_loss: 0.7201 - val_accuracy: 0.7735
Epoch 00028: val_accuracy did not improve from 0.87183
Epoch 29/35
252/252 [==============================] - 22s 88ms/step - loss: 0.0079 - accuracy: 0.9977 - val_loss: 1.5695 - val_accuracy: 0.6279
Epoch 00029: val_accuracy did not improve from 0.87183
Epoch 30/35
252/252 [==============================] - 23s 91ms/step - loss: 0.0151 - accuracy: 0.9949 - val_loss: 0.9042 - val_accuracy: 0.7705
Epoch 00030: val_accuracy did not improve from 0.87183
Epoch 31/35
252/252 [==============================] - 25s 98ms/step - loss: 0.0176 - accuracy: 0.9945 - val_loss: 0.4339 - val_accuracy: 0.8549
Epoch 00031: val_accuracy did not improve from 0.87183
Epoch 32/35
252/252 [==============================] - 25s 98ms/step - loss: 0.0209 - accuracy: 0.9940 - val_loss: 0.5375 - val_accuracy: 0.8231
Epoch 00032: val_accuracy did not improve from 0.87183
Epoch 33/35
252/252 [==============================] - 22s 87ms/step - loss: 0.0122 - accuracy: 0.9960 - val_loss: 0.4257 - val_accuracy: 0.8604
Epoch 00033: val_accuracy did not improve from 0.87183
Epoch 34/35
252/252 [==============================] - 20s 81ms/step - loss: 0.0047 - accuracy: 0.9986 - val_loss: 0.7852 - val_accuracy: 0.7789
Epoch 00034: val_accuracy did not improve from 0.87183
Epoch 35/35
252/252 [==============================] - 21s 81ms/step - loss: 0.0022 - accuracy: 0.9998 - val_loss: 0.4852 - val_accuracy: 0.8485
Epoch 00035: val_accuracy did not improve from 0.87183
Process finished with exit code 0
epoch;accuracy;loss;val_accuracy;val_loss
0;0.57865309715271;0.6740108132362366;0.505216121673584;0.754189670085907
1;0.7816848754882812;0.4649495482444763;0.745156466960907;0.5243210196495056
2;0.8603379726409912;0.31635138392448425;0.6646795868873596;0.7568265199661255
3;0.9130218625068665;0.22393369674682617;0.8489816188812256;0.3330441117286682
4;0.9368787407875061;0.16374491155147552;0.815697968006134;0.3879120647907257
5;0.9534045457839966;0.12757860124111176;0.7858917117118835;0.46191781759262085
6;0.9654572606086731;0.0979345515370369;0.8310978412628174;0.3760699927806854
7;0.9669483304023743;0.0826568678021431;0.8410332798957825;0.38100361824035645
8;0.9749006032943726;0.07206454873085022;0.8494783639907837;0.3936842978000641
9;0.9796222448348999;0.056463561952114105;0.629905641078949;1.4126906394958496
10;0.9802435636520386;0.05741952732205391;0.8032786846160889;0.44680893421173096
11;0.9884443283081055;0.038034938275814056;0.8713363409042358;0.31909409165382385
12;0.9901838898658752;0.029732083901762962;0.8310978412628174;0.3756556808948517
13;0.992420494556427;0.02579391747713089;0.7024341821670532;0.9222777485847473
14;0.9867047667503357;0.03866034001111984;0.63338303565979;1.576461911201477
15;0.98981112241745;0.03023866005241871;0.8400397300720215;0.46194085478782654
16;0.9937872886657715;0.02137649804353714;0.8494783639907837;0.3992445468902588
17;0.9917991757392883;0.024340497329831123;0.7406855225563049;0.6357691287994385
18;0.9926689863204956;0.024148939177393913;0.8062593340873718;0.7326226234436035
19;0.9872018098831177;0.032691892236471176;0.7133631110191345;1.2289057970046997
20;0.9925447106361389;0.025130050256848335;0.871833086013794;0.3385622203350067
21;0.9975149035453796;0.013416153378784657;0.7421758770942688;0.7713814377784729
22;0.989686906337738;0.031160257756710052;0.7883755564689636;0.8067652583122253
23;0.9911779165267944;0.026870066300034523;0.80923992395401;0.5153713226318359
24;0.9941600561141968;0.017166100442409515;0.7615499496459961;0.6128957271575928
25;0.992420494556427;0.023543182760477066;0.8355687856674194;0.5522720813751221
26;0.997390627861023;0.009229014627635479;0.868852436542511;0.4368382692337036
27;0.997390627861023;0.008676432073116302;0.7734724283218384;0.7201353907585144
28;0.9976391792297363;0.008173291571438313;0.627918541431427;1.569467306137085
29;0.9944085478782654;0.017618726938962936;0.7704917788505554;0.9041982889175415
30;0.9911779165267944;0.024421896785497665;0.8549428582191467;0.43394580483436584
31;0.9925447106361389;0.025695674121379852;0.8231495022773743;0.537498950958252
32;0.9962723851203918;0.011314300820231438;0.8604073524475098;0.42571887373924255
33;0.9988816976547241;0.005072937346994877;0.7789369225502014;0.7851630449295044
34;0.999502956867218;0.00223971763625741;0.8484848737716675;0.48518049716949463
best_model_train_loss,best_model_val_loss,best_model_train_acc,best_model_val_acc
0.025130050256848335,0.3385622203350067,0.9925447106361389,0.871833086013794
loss,accuracy,val_loss,val_accuracy
0.6740108132362366,0.57865309715271,0.754189670085907,0.505216121673584
0.4649495482444763,0.7816848754882812,0.5243210196495056,0.745156466960907
0.31635138392448425,0.8603379726409912,0.7568265199661255,0.6646795868873596
0.22393369674682617,0.9130218625068665,0.3330441117286682,0.8489816188812256
0.16374491155147552,0.9368787407875061,0.3879120647907257,0.815697968006134
0.12757860124111176,0.9534045457839966,0.46191781759262085,0.7858917117118835
0.0979345515370369,0.9654572606086731,0.3760699927806854,0.8310978412628174
0.0826568678021431,0.9669483304023743,0.38100361824035645,0.8410332798957825
0.07206454873085022,0.9749006032943726,0.3936842978000641,0.8494783639907837
0.056463561952114105,0.9796222448348999,1.4126906394958496,0.629905641078949
0.05741952732205391,0.9802435636520386,0.44680893421173096,0.8032786846160889
0.038034938275814056,0.9884443283081055,0.31909409165382385,0.8713363409042358
0.029732083901762962,0.9901838898658752,0.3756556808948517,0.8310978412628174
0.02579391747713089,0.992420494556427,0.9222777485847473,0.7024341821670532
0.03866034001111984,0.9867047667503357,1.576461911201477,0.63338303565979
0.03023866005241871,0.98981112241745,0.46194085478782654,0.8400397300720215
0.02137649804353714,0.9937872886657715,0.3992445468902588,0.8494783639907837
0.024340497329831123,0.9917991757392883,0.6357691287994385,0.7406855225563049
0.024148939177393913,0.9926689863204956,0.7326226234436035,0.8062593340873718
0.032691892236471176,0.9872018098831177,1.2289057970046997,0.7133631110191345
0.025130050256848335,0.9925447106361389,0.3385622203350067,0.871833086013794
0.013416153378784657,0.9975149035453796,0.7713814377784729,0.7421758770942688
0.031160257756710052,0.989686906337738,0.8067652583122253,0.7883755564689636
0.026870066300034523,0.9911779165267944,0.5153713226318359,0.80923992395401
0.017166100442409515,0.9941600561141968,0.6128957271575928,0.7615499496459961
0.023543182760477066,0.992420494556427,0.5522720813751221,0.8355687856674194
0.009229014627635479,0.997390627861023,0.4368382692337036,0.868852436542511
0.008676432073116302,0.997390627861023,0.7201353907585144,0.7734724283218384
0.008173291571438313,0.9976391792297363,1.569467306137085,0.627918541431427
0.017618726938962936,0.9944085478782654,0.9041982889175415,0.7704917788505554
0.024421896785497665,0.9911779165267944,0.43394580483436584,0.8549428582191467
0.025695674121379852,0.9925447106361389,0.537498950958252,0.8231495022773743
0.011314300820231438,0.9962723851203918,0.42571887373924255,0.8604073524475098
0.005072937346994877,0.9988816976547241,0.7851630449295044,0.7789369225502014
0.00223971763625741,0.999502956867218,0.48518049716949463,0.8484848737716675
INFO:root:Started the Logging
INFO:root:X training loaded.
INFO:root:(129, 500, 10061)
INFO:root:y training loaded.
INFO:root:(1, 36223)
INFO:root:Setting the shapes
INFO:root:(10061, 500, 129)
INFO:root:(36223, 1)
INFO:root:Started running CNN. If you want to run other methods please choose another model in the config.py file.
INFO:root:Starting CNN.
INFO:root:**********
INFO:root:--- Runtime: 864.3228631019592 seconds ---
INFO:root:Finished Logging
Model: "model"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
input_1 (InputLayer) [(None, 125, 129)] 0
_________________________________________________________________
conv1d (Conv1D) (None, 125, 32) 20640
_________________________________________________________________
batch_normalization (BatchNo (None, 125, 32) 128
_________________________________________________________________
activation (Activation) (None, 125, 32) 0
_________________________________________________________________
max_pooling1d (MaxPooling1D) (None, 62, 32) 0
_________________________________________________________________
conv1d_1 (Conv1D) (None, 62, 64) 10240
_________________________________________________________________
batch_normalization_1 (Batch (None, 62, 64) 256
_________________________________________________________________
activation_1 (Activation) (None, 62, 64) 0
_________________________________________________________________
max_pooling1d_1 (MaxPooling1 (None, 31, 64) 0
_________________________________________________________________
conv1d_2 (Conv1D) (None, 31, 96) 30720
_________________________________________________________________
batch_normalization_2 (Batch (None, 31, 96) 384
_________________________________________________________________
activation_2 (Activation) (None, 31, 96) 0
_________________________________________________________________
max_pooling1d_2 (MaxPooling1 (None, 15, 96) 0
_________________________________________________________________
conv1d_3 (Conv1D) (None, 15, 128) 61440
_________________________________________________________________
batch_normalization_3 (Batch (None, 15, 128) 512
_________________________________________________________________
activation_3 (Activation) (None, 15, 128) 0
_________________________________________________________________
max_pooling1d_3 (MaxPooling1 (None, 7, 128) 0
_________________________________________________________________
conv1d_4 (Conv1D) (None, 7, 160) 102400
_________________________________________________________________
batch_normalization_4 (Batch (None, 7, 160) 640
_________________________________________________________________
activation_4 (Activation) (None, 7, 160) 0
_________________________________________________________________
max_pooling1d_4 (MaxPooling1 (None, 3, 160) 0
_________________________________________________________________
conv1d_5 (Conv1D) (None, 3, 192) 153600
_________________________________________________________________
batch_normalization_5 (Batch (None, 3, 192) 768
_________________________________________________________________
activation_5 (Activation) (None, 3, 192) 0
_________________________________________________________________
max_pooling1d_5 (MaxPooling1 (None, 1, 192) 0
_________________________________________________________________
global_average_pooling1d (Gl (None, 192) 0
_________________________________________________________________
dense (Dense) (None, 1) 193
=================================================================
Total params: 381,921
Trainable params: 380,577
Non-trainable params: 1,344
_________________________________________________________________
Epoch 1/35
906/906 [==============================] - 31s 32ms/step - loss: 0.5758 - accuracy: 0.7073 - val_loss: 0.4077 - val_accuracy: 0.8137
Epoch 00001: val_accuracy improved from -inf to 0.81366, saving model to /Users/ardkastrati/Documents/DeepLearning/DeepEye/runs/1610290451_cnn_downsampled/cnn_best_model.h5
Epoch 2/35
906/906 [==============================] - 26s 29ms/step - loss: 0.3479 - accuracy: 0.8425 - val_loss: 0.3779 - val_accuracy: 0.8337
Epoch 00002: val_accuracy improved from 0.81366 to 0.83368, saving model to /Users/ardkastrati/Documents/DeepLearning/DeepEye/runs/1610290451_cnn_downsampled/cnn_best_model.h5
Epoch 3/35
906/906 [==============================] - 26s 29ms/step - loss: 0.2580 - accuracy: 0.8877 - val_loss: 0.4272 - val_accuracy: 0.8188
Epoch 00003: val_accuracy did not improve from 0.83368
Epoch 4/35
906/906 [==============================] - 26s 29ms/step - loss: 0.2057 - accuracy: 0.9124 - val_loss: 0.2536 - val_accuracy: 0.8893
Epoch 00004: val_accuracy improved from 0.83368 to 0.88930, saving model to /Users/ardkastrati/Documents/DeepLearning/DeepEye/runs/1610290451_cnn_downsampled/cnn_best_model.h5
Epoch 5/35
906/906 [==============================] - 24s 26ms/step - loss: 0.1706 - accuracy: 0.9318 - val_loss: 0.2907 - val_accuracy: 0.8799
Epoch 00005: val_accuracy did not improve from 0.88930
Epoch 6/35
906/906 [==============================] - 28s 31ms/step - loss: 0.1400 - accuracy: 0.9432 - val_loss: 0.3096 - val_accuracy: 0.8868
Epoch 00006: val_accuracy did not improve from 0.88930
Epoch 7/35
906/906 [==============================] - 26s 29ms/step - loss: 0.1191 - accuracy: 0.9509 - val_loss: 0.4230 - val_accuracy: 0.8500
Epoch 00007: val_accuracy did not improve from 0.88930
Epoch 8/35
906/906 [==============================] - 26s 28ms/step - loss: 0.0889 - accuracy: 0.9662 - val_loss: 0.3607 - val_accuracy: 0.8486
Epoch 00008: val_accuracy did not improve from 0.88930
Epoch 9/35
906/906 [==============================] - 28s 31ms/step - loss: 0.0799 - accuracy: 0.9692 - val_loss: 0.3463 - val_accuracy: 0.8792
Epoch 00009: val_accuracy did not improve from 0.88930
Epoch 10/35
906/906 [==============================] - 24s 26ms/step - loss: 0.0667 - accuracy: 0.9749 - val_loss: 0.4728 - val_accuracy: 0.8663
Epoch 00010: val_accuracy did not improve from 0.88930
Epoch 11/35
906/906 [==============================] - 27s 30ms/step - loss: 0.0503 - accuracy: 0.9814 - val_loss: 0.3572 - val_accuracy: 0.8645
Epoch 00011: val_accuracy did not improve from 0.88930
Epoch 12/35
906/906 [==============================] - 27s 29ms/step - loss: 0.0460 - accuracy: 0.9824 - val_loss: 0.4073 - val_accuracy: 0.8792
Epoch 00012: val_accuracy did not improve from 0.88930
Epoch 13/35
906/906 [==============================] - 25s 28ms/step - loss: 0.0416 - accuracy: 0.9846 - val_loss: 0.3703 - val_accuracy: 0.8936
Epoch 00013: val_accuracy improved from 0.88930 to 0.89358, saving model to /Users/ardkastrati/Documents/DeepLearning/DeepEye/runs/1610290451_cnn_downsampled/cnn_best_model.h5
Epoch 14/35
906/906 [==============================] - 24s 27ms/step - loss: 0.0363 - accuracy: 0.9871 - val_loss: 0.4521 - val_accuracy: 0.8899
Epoch 00014: val_accuracy did not improve from 0.89358
Epoch 15/35
906/906 [==============================] - 27s 30ms/step - loss: 0.0345 - accuracy: 0.9876 - val_loss: 0.4472 - val_accuracy: 0.8668
Epoch 00015: val_accuracy did not improve from 0.89358
Epoch 16/35
906/906 [==============================] - 27s 29ms/step - loss: 0.0374 - accuracy: 0.9854 - val_loss: 0.4306 - val_accuracy: 0.8824
Epoch 00016: val_accuracy did not improve from 0.89358
Epoch 17/35
906/906 [==============================] - 26s 29ms/step - loss: 0.0292 - accuracy: 0.9894 - val_loss: 0.4125 - val_accuracy: 0.8921
Epoch 00017: val_accuracy did not improve from 0.89358
Epoch 18/35
906/906 [==============================] - 26s 29ms/step - loss: 0.0279 - accuracy: 0.9891 - val_loss: 0.5160 - val_accuracy: 0.8788
Epoch 00018: val_accuracy did not improve from 0.89358
Epoch 19/35
906/906 [==============================] - 31s 34ms/step - loss: 0.0290 - accuracy: 0.9892 - val_loss: 0.5166 - val_accuracy: 0.8845
Epoch 00019: val_accuracy did not improve from 0.89358
Epoch 20/35
906/906 [==============================] - 22s 25ms/step - loss: 0.0231 - accuracy: 0.9918 - val_loss: 0.4376 - val_accuracy: 0.8933
Epoch 00020: val_accuracy did not improve from 0.89358
Epoch 21/35
906/906 [==============================] - 23s 26ms/step - loss: 0.0253 - accuracy: 0.9914 - val_loss: 0.5365 - val_accuracy: 0.8854
Epoch 00021: val_accuracy did not improve from 0.89358
Epoch 22/35
906/906 [==============================] - 31s 34ms/step - loss: 0.0258 - accuracy: 0.9900 - val_loss: 0.5575 - val_accuracy: 0.8611
Epoch 00022: val_accuracy did not improve from 0.89358
Epoch 23/35
906/906 [==============================] - 27s 30ms/step - loss: 0.0209 - accuracy: 0.9930 - val_loss: 0.5215 - val_accuracy: 0.8730
Epoch 00023: val_accuracy did not improve from 0.89358
Epoch 24/35
906/906 [==============================] - 28s 31ms/step - loss: 0.0210 - accuracy: 0.9925 - val_loss: 0.5367 - val_accuracy: 0.8791
Epoch 00024: val_accuracy did not improve from 0.89358
Epoch 25/35
906/906 [==============================] - 24s 27ms/step - loss: 0.0252 - accuracy: 0.9908 - val_loss: 0.5745 - val_accuracy: 0.8881
Epoch 00025: val_accuracy did not improve from 0.89358
Epoch 26/35
906/906 [==============================] - 27s 29ms/step - loss: 0.0194 - accuracy: 0.9936 - val_loss: 0.6756 - val_accuracy: 0.8156
Epoch 00026: val_accuracy did not improve from 0.89358
Epoch 27/35
906/906 [==============================] - 29s 32ms/step - loss: 0.0222 - accuracy: 0.9915 - val_loss: 0.4927 - val_accuracy: 0.8959