Submitted by perfopt t3_xyrolr in deeplearning
When I try to improve train accuracy by using L2 regularization and Dropout the model performs worse than without them. What am I doing wrong?
Also, please do give me any suggestions to improve validation accuracy.
My classification problem has 100 categories.
Data: I have 6865 samples which is an average of 68.65 samples per category. The category with the smallest number of samples has 52 samples and the one with the largest number of samples has 75.
Below is my model summary.
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
flatten (Flatten) (None, 22399) 0
dense (Dense) (None, 1024) 22937600
dense_1 (Dense) (None, 1024) 1049600
dense_2 (Dense) (None, 512) 524800
dense_3 (Dense) (None, 512) 262656
dense_4 (Dense) (None, 100) 51300
=================================================================
Total params: 24,825,956
Trainable params: 24,825,956
Non-trainable params: 0
Train Accuracy | At Epoch | Test/Val Accuracy | At Epoch | |
---|---|---|---|---|
Baseline | 0.9981 | 180 | 0.7074 | 258 |
With L2 + Dropout | 0.7725 | 297 | 0.5196 | 244 |
Edit: I am using these hyperparams L2 0.001 and Dropout 0.1
jellyfishwhisperer t1_iriddyc wrote
Regularization and drop out helps with overfitting. It will almost always reduce your training accuracy. What you need is a testing dataset and compare there.