Saving best metrics based on Custom metrics failing (WARNING:tensorflow:Can save best model only with CUSTOM METRICS available, skipping) #53155
Labels
comp:keras
Keras related issues
stale
This label marks the issue/pr stale - to be closed automatically if no activity
stat:awaiting response
Status - Awaiting response from author
TF 2.7
Issues related to TF 2.7.0
type:bug
Bug
I have defined a callback that runs on the epoch end and calculated the metrics. It is working fine in terms of calculating the desired metrics. Below is the function for reference
Using this in call back
The issue that I am facing is that it is giving me a warning that says
WARNING:TensorFlow: Can save best model only with val_f1_after_epoch available, skipping
Upon investigating history I found that metrics is available in the history
I think there is a bug in ModelCheckpoint where is it not looking at the custom metrics and not saving the model.
I am using Tensorflow 2.7 (Also tried this with Tensorflow 2.5)
The text was updated successfully, but these errors were encountered: