zea.models.utils¶
Utilities for models
Classes
|
A wrapper for Keras Mean metrics to track multiple loss values. |
- class zea.models.utils.LossTrackerWrapper(prefix)[source]¶
Bases:
object
A wrapper for Keras Mean metrics to track multiple loss values.
- update_state(loss_value)[source]¶
Update the tracker(s) with a loss value.
If loss_value is a dict, then for each key a separate tracker is created (if not already created) and updated. The tracker’s name will be <prefix>_<key>. If loss_value is not a dict, then a default tracker with name <prefix> is updated.
- Parameters:
loss_value – A tensor or a dictionary mapping field names to tensors.