keras-team / autokeras

AutoML library for deep learning
http://autokeras.com/
Apache License 2.0
9.1k stars 1.4k forks source link

problem: Higher number of epochs lead to worse results? #1879

Open jbrepogmailcom opened 1 year ago

jbrepogmailcom commented 1 year ago

When I fit model with 200 epochs, results are pretty good, 54% instead 50% for random selection. But when I raise epochs to 500, I get much worse success ratio, under 50%. Why is that and what is optimal number of epochs?

saisua commented 1 year ago

I am not from the Autokeras team, but when training ML models, the optimal number of epochs is a difficult problem and there is no final answer. Usually models improve until a local minima and then they can't go further. I would suggest you to check Tensorflow's callbacks as I believe they work with Autokeras, so you can control the learning rate to optimize said local minima, or stop at the best epoch. As for trying to get global minima, there is no way to ensure a model will reach global minima, so instead raise the number of trials.