forked from keras-team/keras
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
General stateful metrics fixes (keras-team#9446)
* Require stateful metrics layers to be actually stateful * Prevent stateful metrics to leak np.floats to the History object * Progbar: Format stateful metrics values as floats alike other metrics * test_stateful_metrics: Also test validation set evaluation This makes sure the metric is reset before evaluating valset. * Add support for stateful metrics in fit_generator() and evaluate_generator() * Document stateful metrics It would be even better to have full-fledged stateful layers documentations, but I lack the knowledge and experience to explain that well. * evaluate_generator(): Do not leak np.float to History here either * Revert stateful metrics documentation until the API stabilizes * Progbar: Explain stateful metrics handling * Model.evaluate_generator(): More consistent stateful metrics handling Use metrics_names, rather than metrics + index juggling to skip loss. Make loss-only output handling consistent with other Model methods. all_outs -> outs_per_batch to avoid confusion, all_outs has swapped dimensions in predict_generator().
- Loading branch information
Showing
3 changed files
with
66 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters