commit 9d989d6042bf83bede29d5a4e489df097c25475f
parent f258bea01d6ea61fa97a4e0d9d81009bbbd354f8
Author: Étienne Simon <esimon@esimon.eu>
Date: Thu, 17 Apr 2014 12:19:16 +0200
Fix auto-saving
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/model.py b/model.py
@@ -157,6 +157,7 @@ class Model(object):
(valid_mean, valid_top10) = self.error('valid')
print >>sys.stderr, 'valid mean: {0:<15} valid top10: {1:<15}'.format(valid_mean, valid_top10),
if not hasattr(self, 'best_mean') or valid_mean > self.best_mean:
+ self.best_mean = valid_mean
print >>sys.stderr, ' (best so far',
if self.hyperparameters['save best model']:
print >>sys.stderr, ' saving',