im dealing with bunch of image dataset
however it takes a lot of time to learn, so i used earlystopping in tensorflow
this is my callback option & fit option
(I know monitoring acc is not a good option, but just wanted to see how earlystopping works)
tf.keras.callbacks.EarlyStopping(
monitor='accuracy',
patience=3,
#mode='max',
verbose=2,
baseline=0.98)
model.fit(x, y, batch_size=16, epochs=10, verbose=2, validation_split=0.2, callbacks=callbacks)
however, this is the result
101/101 - 42s - loss: 6.9557 - accuracy: 6.2461e-04 - val_loss: 6.9565 - val_accuracy: 0.0000e+00
Epoch 2/10
101/101 - 39s - loss: 6.9549 - accuracy: 0.0019 - val_loss: 6.9558 - val_accuracy: 0.0000e+00
Epoch 3/10
101/101 - 37s - loss: 6.9537 - accuracy: 0.0037 - val_loss: 6.9569 - val_accuracy: 0.0000e+00
Epoch 00003: early stopping
since monitoring value 'accuracy' kept increasing, expected it not to stop.
plus, I want earlystopping to monitor acc like this
acc=0, acc=0.1....acc=0.5, acc=0.4, acc=0.5, acc=0.6 #dont stop if increases again in patience epoch
acc=0, acc=0.1....acc=0.5, acc=0.3, acc=0.4, acc=0.35 #stop if acc does not increases again in patience epoch
how should i do that?