How can I avoid "early stopping"?
SpreadKnowledge opened this issue · 0 comments
Hello, I'm trying to use your code to create my image classification model.
When I run train.py, I get an "early stopping" message early on and end train.py.
Epoch 26/100 1/70 [..............................] - ETA: 12s - loss: 0.3207 - accuracy: 0.906 2/70 [..............................] - ETA: 12s - loss: 0.4309 - accuracy: 0.859 3/70 [>.............................] - ETA: 11s - loss: 0.4152 - accuracy: 0.864 4/70 [>.............................] - ETA: 11s - loss: 0.3709 - accuracy: 0.882 5/70 [=>............................] - ETA: 11s - loss: 0.3812 - accuracy: 0.856 6/70 [=>............................] - ETA: 11s - loss: 0.3986 - accuracy: 0.849 7/70 [==>...........................] - ETA: 11s - loss: 0.4186 - accuracy: 0.839 8/70 [==>...........................] - ETA: 11s - loss: 0.4204 - accuracy: 0.839 9/70 [==>...........................] - ETA: 10s - loss: 0.4238 - accuracy: 0.84310/70 [===>..........................] - ETA: 10s - loss: 0.4284 - accuracy: 0.84311/70 [===>..........................] - ETA: 10s - loss: 0.4258 - accuracy: 0.84912/70 [====>.........................] - ETA: 10s - loss: 0.4850 - accuracy: 0.83813/70 [====>.........................] - ETA: 10s - loss: 0.4736 - accuracy: 0.83614/70 [=====>........................] - ETA: 9s - loss: 0.4740 - accuracy: 0.834870/70 [==============================] - 15s 220ms/step - loss: 0.5117 - accuracy: 0.8263 - val_loss: 1.9986 - val_accuracy: 0.3203 Epoch 27/100 1/70 [..............................] - ETA: 12s - loss: 0.6101 - accuracy: 0.750 2/70 [..............................] - ETA: 12s - loss: 0.5081 - accuracy: 0.812 3/70 [>.............................] - ETA: 11s - loss: 0.4593 - accuracy: 0.833 4/70 [>.............................] - ETA: 11s - loss: 0.4932 - accuracy: 0.828 5/70 [=>............................] - ETA: 11s - loss: 0.5176 - accuracy: 0.825 6/70 [=>............................] - ETA: 11s - loss: 0.4593 - accuracy: 0.838 7/70 [==>...........................] - ETA: 11s - loss: 0.5008 - accuracy: 0.825 8/70 [==>...........................] - ETA: 10s - loss: 0.4992 - accuracy: 0.828 9/70 [==>...........................] - ETA: 10s - loss: 0.4836 - accuracy: 0.83310/70 [===>..........................] - ETA: 10s - loss: 0.5110 - accuracy: 0.82811/70 [===>..........................] - ETA: 10s - loss: 0.5570 - accuracy: 0.81212/70 [====>.........................] - ETA: 10s - loss: 0.5605 - accuracy: 0.80713/70 [====>.........................] - ETA: 10s - loss: 0.5754 - accuracy: 0.80514/70 [=====>........................] - ETA: 9s - loss: 0.5727 - accuracy: 0.810370/70 [==============================] - 15s 216ms/step - loss: 0.5514 - accuracy: 0.8138 - val_loss: 2.2937 - val_accuracy: 0.3672 Epoch 28/100 1/70 [..............................] - ETA: 12s - loss: 0.7783 - accuracy: 0.812 2/70 [..............................] - ETA: 12s - loss: 0.8480 - accuracy: 0.765 3/70 [>.............................] - ETA: 11s - loss: 0.6885 - accuracy: 0.791 4/70 [>.............................] - ETA: 11s - loss: 0.6202 - accuracy: 0.828 5/70 [=>............................] - ETA: 11s - loss: 0.5674 - accuracy: 0.843 6/70 [=>............................] - ETA: 11s - loss: 0.5644 - accuracy: 0.843 7/70 [==>...........................] - ETA: 11s - loss: 0.5498 - accuracy: 0.848 8/70 [==>...........................] - ETA: 11s - loss: 0.5700 - accuracy: 0.835 9/70 [==>...........................] - ETA: 10s - loss: 0.5517 - accuracy: 0.83610/70 [===>..........................] - ETA: 10s - loss: 0.5372 - accuracy: 0.84011/70 [===>..........................] - ETA: 10s - loss: 0.5292 - accuracy: 0.84012/70 [====>.........................] - ETA: 10s - loss: 0.5308 - accuracy: 0.84113/70 [====>.........................] - ETA: 10s - loss: 0.5164 - accuracy: 0.84614/70 [=====>........................] - ETA: 9s - loss: 0.5274 - accuracy: 0.843870/70 [==============================] - 15s 217ms/step - loss: 0.5307 - accuracy: 0.8201 - val_loss: 1.9304 - val_accuracy: 0.3141 Epoch 00028: early stopping Classes are saved Training is finished!
I checked the values of "-loss", "-accuracy", "-val_loss" and "-val_accuracy", and I thought that I should still continue train.py.
I set 100 with "--nb_epoch". How can I keep the train up to 100 epoch?
The versions such as Tensorflow installed on my PC are:
・Python : 3.6
・CUDA : 10.0
・cuDNN : 7.6.5
・Tensorflow-gpu : 1.15
・keras : 2.3.1
Thank you for your cooperation!