def create_model(trial):
// We optimize the numbers of layers and their units.
n_layers = int(trial.suggest_uniform("n_layers", 1, 4))
layers = []
for i in range(n_layers):
n_units = int(trial.suggest_loguniform("n_units_l{}".format(i), 4, 128))
After Change
def create_model(trial):
// We optimize the numbers of layers and their units.
n_layers = trial.suggest_int("n_layers", 1, 3)
layers = []
for i in range(n_layers):
n_units = int(trial.suggest_loguniform("n_units_l{}".format(i), 4, 128))