KerasTuner searches hyperparameter configurations for Keras models instead of training only one fixed configuration. A model-building function exposes tunable choices such as layer width and learning rate. section 8.1.1
A Hyperband tuner evaluates validation accuracy, allocates training resources adaptively, and can stop weak runs early. EarlyStopping further halts training when validation loss stops improving. section 8.1.1
MNIST model search
Define an integer search from 32 to 512 units and choose the Adam learning rate from 0.01, 0.001, or 0.0001. Search with Hyperband, select the best configuration, rebuild the model, train it, and evaluate it on test data. section 8.1.1
Listing 8.16 The Hyperband model tuner
tuner = kt.Hyperband(model_builder,
objective='val_accuracy',
max_epochs=10,
factor=3,
directory='my_dir',
project_name='intro_to_kt')
Shows the Hyperband tuner configured with an objective, epoch limit, reduction factor, and project storage directory. section 8.1.1


