I'm using Pygad to train a Keras NN through genetic algorithm, and as far as I can tell the code works, however, I do not know how to prevent it from printing the epoch in the terminal:
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)
As you can see here, I've already set suppress_warnings=True, however, when I run ga_instance.run(), the terminal will continue to print these texts:
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
1/1 [==============================] - 0s 29ms/step
1/1 [==============================] - 0s 29ms/step
1/1 [==============================] - 0s 29ms/step
1/1 [==============================] - 0s 37ms/step
1/1 [==============================] - 0s 38ms/step
1/1 [==============================] - 0s 33ms/step
1/1 [==============================] - 0s 34ms/step
1/1 [==============================] - 0s 32ms/step
1/1 [==============================] - 0s 31ms/step
1/1 [==============================] - 0s 29ms/step
I'm not sure if this issue is being caused by PyGad or Tensorflow, but I couldn't figured out a way to solve this.
Thank you for your time.