I used BayesianOptimization to optimize hyper-parameters of a Keras model. I got best_model as a result. Is it possible to get the training history of best_model (training loss and validation loss during epochs)? I tried to get best_model.history but the result is empty. Thank you for your help
tuner_bo = BayesianOptimization(
hypermodel,
objective=‘mse’,
max_trials=10,
seed=42,
executions_per_trial=2,
overwrite=True
)
tuner_bo.search(x_train_scaled, y_train, epochs=nb_epochs, validation_split=0.2, verbose=0)
best_model = tuner_bo.get_best_models(num_models=1)[0]
pred = best_model.predict(x_test_scaled, batch_size = 32)