pythonkeraskeras-tuner

Keras Tuner returning an empty list when calling get_best_hyperparameters() and get_best_models(num_models=1)?


I am trying to use Keras Tuner to tune hyperparameters but I am running into trouble. After I run tuner.search() with well-formed inputs and the search successfully runs, tuner.get_best_hyperparameters() and tuner.get_best_models(num_models=1) both return empty lists. I am not sure what is the source of this error. The search is definitely running correctly as I am seeing accuracies for each batch in the search. Let me know how to proceed. Thanks


Solution

  • This problem is likely originated in not calling of tuner.search before calling the get_best_* (hyperparameters or models).