-
Notifications
You must be signed in to change notification settings - Fork 43
Description
What would you like changed/added and why?
Rewrite functions in metrics.py with model subclassing. See here. The drawback of the current approach is that metrics have to be kept track of when training models and that can not always be possible.
What would be the benefit?
Currently, loading a model from a previously stored checkpoint (warm_start) throws the following warning
WARNING:tensorflow:Unable to restore custom metric. Please ensure that the layer implements
get_configandfrom_configwhen saving. In addition, please use thecustom_objectsarg when callingload_model().
Does the change make something easier to use?
This change will avoid situations where the user has to document the metric used and subsequently pass it again at load time. Model sub-classing (with @keras.saving.register_keras_serializable) will greatly simplify this process.