Having a model that converges quickly isn't necessarily a problem. It may be that there is a strong, easily detected relationship between your predictors and the target. There's nothing obviously wrong with your model, but plotting the model using keras.utils.plot_model(model)
will help confirm the layers are connected correctly.
What seems more concerning is that your validation accuracy is higher than your training accuracy for these epochs. This may indicate a problem with how you've selected your validation data; it may not be independent of your training data, or it may not be a representative sample. So that's the first thing I'd check.
If you want the model training to converge more slowly, try reducing the learning rate (set or change the learning_rate
optimizer parameter on your model.compile
call).
If you want to get more information about the model around epochs 7-9, there are two ways to do this:
Use checkpointing, which will save your model at each checkpoint. You can then test the model at those checkpoints - either using your validation or test data to get more information about the predictions being made. (Set the checkpoint
callback on your model.fit
call).
Stop training at an epoch, again run some tests, then resuming training. To do this, you call model.fit
multiple times. On the first call, set epochs=7
, so the model trains for 7 epochs. Then check your model - you can check the weights and evaluate your test data. Then to continue training, call model.fit
again but set initial_epoch=7
and epochs=8
. Then your model will train for another epoch. Repeat this to stop at all the epochs you want to investigate, then for the last call to model.fit
set epochs=200
to complete training.