0

I'm working on a binary classification model over the RAVDESS dataset with a CNN model.

These are the performances on the train and validation set

enter image description here

and these are the performance on the test set

enter image description here

for the unbalanced class distribution, the metrics that I need to check are recall, fscore, and precision. This is the class distribution

enter image description here

but I'm trying so many different setups of the same CNN, and this is something like the best result. I still decreased the size of the CNN and used augmentation tecniques.

Question: What can I do to decrease the overfitting on training data and get the validation error closer to the training error?

My training dataset shape is (8144, 323, 1) and this is the model

model = tf.keras.models.Sequential()

model.add(tf.keras.layers.Conv1D(256, 8, padding='same', input_shape=(X_train.shape[1], 1))) model.add(tf.keras.layers.Activation('relu')) model.add(tf.keras.layers.Conv1D(256, 8, padding='same')) model.add(tf.keras.layers.BatchNormalization()) model.add(tf.keras.layers.Activation('relu')) model.add(tf.keras.layers.Dropout(0.25)) model.add(tf.keras.layers.MaxPooling1D(pool_size=(8))) model.add(tf.keras.layers.Conv1D(128, 8, padding='same')) model.add(tf.keras.layers.Activation('relu')) model.add(tf.keras.layers.Conv1D(128, 8, padding='same')) model.add(tf.keras.layers.Activation('relu')) model.add(tf.keras.layers.Conv1D(128, 8, padding='same')) model.add(tf.keras.layers.Activation('relu')) model.add(tf.keras.layers.Conv1D(128, 8, padding='same')) model.add(tf.keras.layers.BatchNormalization()) model.add(tf.keras.layers.Activation('relu')) model.add(tf.keras.layers.Dropout(0.25)) model.add(tf.keras.layers.MaxPooling1D(pool_size=(8))) model.add(tf.keras.layers.Conv1D(64, 8, padding='same')) model.add(tf.keras.layers.Activation('relu')) model.add(tf.keras.layers.Conv1D(64, 8, padding='same')) model.add(tf.keras.layers.Activation('relu')) model.add(tf.keras.layers.Flatten()) model.add(tf.keras.layers.Dense(2, activation="softmax"))

opt = tf.keras.optimizers.SGD(learning_rate=0.0001, momentum=0.0, decay=0.0, nesterov=False) loss = tf.keras.losses.BinaryCrossentropy() model.summary() model.compile(loss=loss, optimizer=opt, metrics=['accuracy', fscore, precision, recall])

while I'm using some TensorFlow callback such as EarlyStopping and ReduceLROnPlateau

  • I don't se overfitting, the validation error is still going down – rep_ho Jul 20 '22 at 13:49
  • That's true, but I can't reach to decrease the validation error, while the epochs are increasing, both errors decrease, but the validation error is slower than the training error. I have no idea how to solve this problem, I just thought that it was an overfitting problem. I just want try to get validation error closer to the training one. – Damiano Imola Jul 20 '22 at 13:55
  • I think you should edit your Q so it is only about overfiting and ask another Q about augmentation techniques for audio data. You might also look here for an answer https://stats.stackexchange.com/questions/tagged/overfitting – rep_ho Jul 20 '22 at 14:06
  • I'll do, thanks – Damiano Imola Jul 20 '22 at 14:11

0 Answers0