I tried using callbacks but it seems that it take the difference of val_acc of two epoch and if the difference less than defined then it will stop. But, I want to stop the training when val_acc becomes 1.00.
so, how can I stop learning when val_acc becomes 1.00 for n(let's say 5 times ) times continuously.
You could try making your own callback. See https://keras.io/callbacks/#callback. Custom callbacks can access the val_acc after each epoch, so you could just make a custom callback class to keep track of how many times in a row the accuracy is 1.0. Look at https://keras.io/callbacks/#create-a-callback for examples of custom callbacks.
Thanks
hi @gauravshelangia how do you using the Callback to custiom it? Do you give your code? Thanks.
Below is thepart of my code that solve my issue:
for epoch in range (epochs):
fit = model.fit(X, Y, nb_epoch=1, batch_size=20,validation_split=0.2, verbose=1)
print epoch
if fit.history['val_acc'][0]*100 >= 98 :
break;
may be this solves your problem
Most helpful comment
Below is thepart of my code that solve my issue:
may be this solves your problem