bstriner / keras-tqdm

Keras integration with TQDM progress bars
MIT License
348 stars 41 forks source link

Fix exception when fit is fed by tf.data.Dataset #26

Open mmv opened 6 years ago

mmv commented 6 years ago

If model.fit() is called with a tf.data.Dataset, the self.params dictionary will contain {'samples': None} which later breaks (on line 120). Checking if the value is falsey should be enough to aim at the correct mode as these values don't make sense as 0 either.

lminer commented 5 years ago

This did not work for me. Instead, I had to do:

if 'samples' in self.params and self.params['samples'] is not None:

Same for elif statement below that for nb_sample