2

I have two questions regarding the Keras Tuner Hyperband class (for a regression problem)

tuner = kerastuner.tuners.hyperband.Hyperband(hypermodel,
                                  objective,
                                  max_epochs,
                                  factor=3,
                                  hyperband_iterations=1,
                                  seed=None,
                                  hyperparameters=None,
                                  tune_new_entries=True,
                                  allow_new_entries=True,
                                  **kwargs)

https://keras-team.github.io/keras-tuner/documentation/tuners/#hyperband-class

  1. Unlike BayesianOptimization and RandomSearch, the Tuner Hyperband (and Sklearn) does not have an argument 'max_trials'. What is the best way to define them? The documentation mentions a maximum of N*(log(N)/log(f))^2 cumulative epochs across all trials of (N=max_epochs, f=3 default) which seems very high considering that I usually need max_epochs > 10000 for a good training run. I would like to limit Keras Tuner computation time, for example to approximately one day. Is there a nicer way than canceling per ctrl+c in order to automatically start the training?

  2. When I start the tuning using

    tuner.search(
             x=trainX,
             y=trainY,
             validation_split=0.1,
             batch_size=batch_size,
             callbacks=[stop_early],
             epochs=max_epochs_search)
    

    another argument for the num of epochs can be passed. What is the relation between 'epochs' for 'search()' and 'max_epochs' for 'Hyperband()'? None of them or the formula N*(log(N)/log(f))^2 seems to fit the overall number of epochs.

I could not find much information elsewhere. Also after reading the paper this is not yet clear to me. Any hints are welcome. Thank you!

barhdi
  • 21
  • 1
  • 2

1 Answers1

0

Regarding your second question:

According to this, it still seems to be an open issue and looks like the 'epochs' argument of the search()-method is redundant.

SirIcarus
  • 301
  • 2
  • 4
  • 5
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/30314990) – Tom Nov 14 '21 at 04:11