MatchZoo icon indicating copy to clipboard operation
MatchZoo copied to clipboard

save model

Open xuezzz opened this issue 4 years ago • 3 comments

How to save the best model of dev data,and use this model to evaluate test data ? Thanks!

xuezzz avatar Apr 04 '20 05:04 xuezzz

You can refer the EvaluateAllMetrics in the matchzoo/engine/callbacks to see the policy of saving models. We save the models according the params once_every.

faneshion avatar Apr 07 '20 00:04 faneshion

So I can save models every epoch, but i can't only save the best model?

xuezzz avatar Apr 10 '20 06:04 xuezzz

tf.keras.callbacks.ModelCheckpoint has an arugument save_best_only, you can use this callback to save the best model.

ModelCheckpoint

luozhouyang avatar Jun 06 '20 12:06 luozhouyang