How should I improve my CNN binary classification model from overfitting and underfitting

I am trying to do the cats dogs classification problem, the problem is that my model is overfitting and I have tried all the techniques I know in order to solve but nothing is working such as dropout, data augmentation, l2 and l1 reg. Can you please help me? After the end of the training, my train accuracy was: 0.7868 and my validation accuracy was 0.7044.

my image size are (h=48,w=48 with 3 channels, and batch size = 128)

This is my model architecture :

model = tf.keras.Sequential([
  tf.keras.layers.Conv2D(32, kernel_size=(3,3), padding='same', activation='relu', input_shape=(img_height, img_width, 3)),

  tf.keras.layers.Conv2D(64, kernel_size=(3, 3), activation='relu', padding='same'),

  tf.keras.layers.BatchNormalization(),

  tf.keras.layers.MaxPooling2D(pool_size = (2, 2)),
  tf.keras.layers.Dropout(0.25),

  tf.keras.layers.Conv2D(128, kernel_size=(3, 3), activation='relu',
             padding='same', kernel_regularizer=regularizers.l2(0.01)),

  tf.keras.layers.Conv2D(256, kernel_size=(3, 3), activation='relu',
             padding='same', kernel_regularizer=regularizers.l2(0.01)),

  tf.keras.layers.BatchNormalization(),

  tf.keras.layers.MaxPooling2D(pool_size = (2, 2)),

  tf.keras.layers.Dropout(0.25),

  tf.keras.layers.Flatten(),

  tf.keras.layers.Dense(1024,activation='relu'),
  tf.keras.layers.Dropout(0.5),
  tf.keras.layers.Dense(1, activation = 'sigmoid')
 ])


model.compile(optimizer = adam_v2.Adam(learning_rate=0.001, decay=1e-6),
          loss = 'binary_crossentropy', metrics = ['accuracy'])

Topic binary-classification cnn data-augmentation overfitting deep-learning

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.