Skip to content

keras.ga - How to disable epoch printing? #115

Closed
@Xascoria

Description

@Xascoria

Hello,

I'm trying to use Pygad to train a Keras NN, however, when running ga_instance.run(), it always prints these lines every epoch:

1/1 [==============================] - 0s 34ms/step
1/1 [==============================] - 0s 36ms/step
1/1 [==============================] - 0s 34ms/step
1/1 [==============================] - 0s 36ms/step
1/1 [==============================] - 0s 31ms/step
1/1 [==============================] - 0s 29ms/step

I've looked around but couldn't find a way to disable them, I already have suppress_warnings=True when creating the GA

ga_instance = pygad.GA(num_generations=15, num_parents_mating=5, fitness_func=fitness_func, initial_population=keras_ga.population_weights, on_generation=on_generation, suppress_warnings=True, keep_parents=0)

Thank you for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions