netrack / keras-metrics

Metrics for Keras. DEPRECATED since Keras 2.3.0
MIT License
165 stars 23 forks source link

Allow saving and loading models (ugly hack). #25

Closed janstrohbeck closed 5 years ago

janstrohbeck commented 5 years ago

Tricks keras upon serialization into saving only the name of the metric to be stored, which allows loading the model sucessfully. See #13

ybubnov commented 5 years ago

@janstrohbeck, well, wow, I need to think about it :smiley:

janstrohbeck commented 5 years ago

You don't have to merge that, I just wanted to push it so others can find it as well. It's really annoying when models can't be loaded for evaluation of a trained model. But this PR is just a workaround, no real solution.

ybubnov commented 5 years ago

@janstrohbeck, this fix can't get away from my head. Let's stick with this metaprogramming trick, and create an issue for future refactoring.

Gunkkk commented 4 years ago

Sorry, I still have the problem with 1.1.0.

ybubnov commented 4 years ago

Hi @Gunkkk, can you, please, provide an example of the code that does not work to reproduce the problem?