experiment = sigopt.create_experiment(
name="Keras Model Optimization (Python)",
dict(name="hidden_layer_size", type="int", bounds=dict(min=32, max=128)),
dict(name="activation_function", type="categorical", categorical_values=["relu", "tanh"]),
metrics=[dict(name="holdout_accuracy", objective="maximize")],
for run in experiment.loop():
holdout_accuracy = execute_keras_model(run)
run.log_metric("holdout_accuracy", holdout_accuracy)
# get the best Runs for the Experiment
best_runs = experiment.get_best_runs()