fix keras progbar output collision (2)

ensures that `keras.model.fit()` progbar output is complete before any output from custom callbacks appears on epoch end. Basically this edit puts the standard `ProgbarLogger` first in the list of callbacks. Originally discussed at [tf github]() with problem description and gist examples. Latest example is [here]((https://colab.research.google.com/gist/poedator/3630b1cdec32ff6ef6ccdf6b63c4957a/custom_callback.ipynb).
This commit is contained in:
Poedator 2020-10-08 13:06:23 +03:00 committed by GitHub
parent 68a6fe0d98
commit a2e35ccd8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -264,7 +264,7 @@ class CallbackList(object):
if self._progbar is None and add_progbar:
self._progbar = ProgbarLogger(count_mode='steps')
self.callbacks.append(self._progbar)
self.callbacks.insert(0, self._progbar)
if self._history is None and add_history:
self._history = History()