0
$\begingroup$

I am trying to apply the following model on my data which is consists of (4030 samples as 5 classes) each sample is MFCC features which is extracted from an audio clip consisting of (20 second) and I am trying to apply classification, but I got very poor accuracy and I also have overfitting, , Although I am using data augmentation and I also try to apply Batch Normalization to improve overfitting but the result is very bad.
the Model:

Effnet=tensorflow.keras.applications.EfficientNetB7( input_shape=(IMG_SIZE,IMG_SIZE,3), 
include_top=False,weights="imagenet",pooling="avg")
Effnet.trainable = False
x = Flatten()(Effnet.output)
x=(BatchNormalization())(x)
#add two fully connected dense layers 1024 as my model 
x=Dense(1024)(x)
x=(BatchNormalization())(x)
x=Activation('relu')(x)
x=Dense(1024)(x)
x=(BatchNormalization())(x)
x=Activation('relu')(x)
x = Dense(NUM_CLASSE)(x)
x=(BatchNormalization())(x)
prediction =Activation('softmax')(x)
model = Model(inputs=Effnet.input, outputs=prediction)
model.summary()

the learning curve: enter image description here the confuusion matrix: enter image description here

Any help, Regards in advance!

$\endgroup$
5
  • $\begingroup$ Not sure I fully understand your question, but in contrast to what you mention in your post the learning curve shows quite a high accuracy (90%+ on the validation data) and does not show signs of overfitting (since the validation accuracy is higher than the training accuracy). $\endgroup$
    – Oxbowerce
    May 25 at 9:30
  • $\begingroup$ agree with @Oxbowerce - did you have line colors other way round? On the other hand, you set Effnet.trainable = False so the model is not fine-tuned by new data. Is this what you really want? $\endgroup$
    – lpounng
    May 25 at 9:50
  • $\begingroup$ @Oxbowerce do you mean that, despite of the gab between the training curve and validation curve this mean there is no overfitting. I thought that meant overfitting. so why my confusion matrix in very bad. $\endgroup$
    – Beba.S
    May 25 at 10:55
  • $\begingroup$ @Ipounng when I set ` Effnet.trainable = Ture` it give me error in model_history = model.fit(train_set, batch_size=16,epochs=10,validation_data=valid_set, verbose=2) As ` ResourceExhaustedError: Graph execution error:` $\endgroup$
    – Beba.S
    May 25 at 11:00
  • $\begingroup$ Overfitting is when your training accuracy exceeds the validation accuracy, which is obviously not the case when looking at the learning curves. The question regarding your confusion matrix is hard to answer since we don't know how you are constructing it. $\endgroup$
    – Oxbowerce
    May 25 at 11:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.