ahmedfgad / GeneticAlgorithmPython

Source code of PyGAD, a Python 3 library for building the genetic algorithm and training machine learning algorithms (Keras & PyTorch).
https://pygad.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.79k stars 451 forks source link

How do I suppress verbose output on kerasga fit cycle #207

Open agcala opened 1 year ago

agcala commented 1 year ago

Is there a way to suppress the verbose output with a parameter maybe?

62/62 [==============================] - 1s 1ms/step
62/62 [==============================] - 0s 1ms/step
62/62 [==============================] - 0s 1ms/step
62/62 [==============================] - 0s 1ms/step
62/62 [==============================] - 0s 1ms/step
62/62 [==============================] - 0s 1ms/step
62/62 [==============================] - 0s 1ms/step
62/62 [==============================] - 0s 1ms/step
62/62 [==============================] - 0s 1ms/step
62/62 [==============================] - 0s 1ms/step
Generation = 1
.  .  .  .  .  .  .

Also, is there a way to use a input data generator for large file sizes? I mean for toys examples it is okay but when it comes to real life data it can be tricky. I wouldn't mind a way to control the batch size either.

ahmedfgad commented 1 year ago

The new release will disable printing the epochs log messages. This happens when calling the keras.predict() method. This commit has the solution https://github.com/ahmedfgad/GeneticAlgorithmPython/commit/0fe7e245239d4e7e630f8ffcc4cdb97d8ba6ecb1

Right now there is no way to control the patch size or pass an input data generator. But it is interesting to support passing an input data generator in an upcoming release. Thank you.