Validation Accuracy stays constant upto 4 decimal places while Training Accuracy increases
This is my model summary for reference:
Model: "sequential"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
conv2d (Conv2D) (None, 98, 98, 32) 320
_________________________________________________________________
activation (Activation) (None, 98, 98, 32) 0
_________________________________________________________________
max_pooling2d (MaxPooling2D) (None, 49, 49, 32) 0
_________________________________________________________________
conv2d_1 (Conv2D) (None, 47, 47, 32) 9248
_________________________________________________________________
activation_1 (Activation) (None, 47, 47, 32) 0
_________________________________________________________________
max_pooling2d_1 (MaxPooling2 (None, 23, 23, 32) 0
_________________________________________________________________
conv2d_2 (Conv2D) (None, 21, 21, 64) 18496
_________________________________________________________________
activation_2 (Activation) (None, 21, 21, 64) 0
_________________________________________________________________
max_pooling2d_2 (MaxPooling2 (None, 10, 10, 64) 0
_________________________________________________________________
<PERSON> (<PERSON>) (None, 6400) 0
_________________________________________________________________
dense (Dense) (None, 64) 409664
_________________________________________________________________
activation_3 (Activation) (None, 64) 0
_________________________________________________________________
dropout (Dropout) (None, 64) 0
_________________________________________________________________
dense_1 (Dense) (None, 26) <PHONE_NUMBER>
_________________________________________________________________
activation_4 (Activation) (None, 26) 0
=================================================================
Total params: 439,418
Trainable params: 439,418
Non-trainable params: 0
_________________________________________________________________
This is the output i am getting when I train my model:
WARNING:tensorflow:sample_weight modes were coerced from
...
to
['...']
WARNING:tensorflow:sample_weight modes were coerced from
...
to
['...']
Train for 41 steps, validate for 8 steps
Epoch 1/5
41/41 [==============================] - 29s 719ms/step - loss: 0.4022 - acc: 0.8336 - val_loss: 0.1885 - val_acc: 0.9615
Epoch 2/5
41/41 [==============================] - 20s 480ms/step - loss: 0.2523 - acc: 0.9294 - val_loss: 0.1723 - val_acc: 0.9615
Epoch 3/5
41/41 [==============================] - 20s 481ms/step - loss: 0.2204 - acc: 0.9485 - val_loss: 0.1672 - val_acc: 0.9615
Epoch 4/5
41/41 [==============================] - 20s 482ms/step - loss: 0.2098 - acc: 0.9548 - val_loss: <PHONE_NUMBER> - val_acc: 0.9615
Epoch 5/5
41/41 [==============================] - 20s 498ms/step - loss: 0.1997 - acc: 0.9583 - val_loss: 0.1669 - val_acc: 0.9615
This is the model history after I trained the model:
{'loss': [0.40232268926556125, 0.2524432904698366, 0.22039496203873055, 0.2098230598894365, 0.199863911314976],
'acc': <PHONE_NUMBER>, <PHONE_NUMBER>, <PHONE_NUMBER>, <PHONE_NUMBER>, 0.958294],
'val_loss': [0.18854963406920433, 0.17227689549326897, 0.16715877316892147, 0.16466446034610271, 0.16689967922866344],
'val_acc': <PHONE_NUMBER>, <PHONE_NUMBER>, <PHONE_NUMBER>, <PHONE_NUMBER>, <PHONE_NUMBER>]}
The val_acc stays at <PHONE_NUMBER> no matter what i do. I have tried increasing the number of epochs, my dataset is unbiased and i am using data augmentation so i don't think the amount of data is the problem.
NOTE: This is my first time using ImageDataGenerator(). 695