Issue with re-loading model
marcus-huddo opened this issue · comments
As similarly shared by another user, I am having an issue with re-loading a saved model. I am returned with this issue.
ValueError: Unable to restore custom object of class "MeanMetricWrapper" (type _tf_keras_metric). Please make sure that this class is included in the custom_objects
arg when calling load_model()
. Also, check that the class implements get_config
and from_config
.
Complete metadata: {'class_name': 'MeanMetricWrapper', 'name': 'macro_f1', 'dtype': 'float32', 'config': {'name': 'macro_f1', 'dtype': 'float32'}, 'shared_object_id': 10}
I've also made attempts with including {'KerasLayer':hub.KerasLayer} as a custom object, also along with setting the 'complete metadata' as custom objects as well but still no luck.
Any help or response is greatly appreciated, thankyou.