User defined metrics not loading with load_model

Viewed 13

I have created user-defined metrics as acc1 and acc2 for classwise accurcy in keras, I have saved the model. Now when I am loading that model again in a different file I m getting the following error

ValueError: Unknown metric function: acc_1_0

I am trying to run evaluate a function on a trained model with different data as

loss_and_metrics = model.evaluate(test_generator, batch_size=batch_size)

The issue seems to be that the metric is not system defined, is there any way to resolve this issue, I don't want to train the whole model again it will take 2 days. Thanks

0 Answers
Related