commit 4956fff0cdc7b0f86d791e9fd6d6d33a2263263e
parent 9d989d6042bf83bede29d5a4e489df097c25475f
Author: Étienne Simon <esimon@esimon.eu>
Date: Thu, 17 Apr 2014 12:59:44 +0200
Fix auto-saving (bis)
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/model.py b/model.py
@@ -156,7 +156,7 @@ class Model(object):
print >>sys.stderr, 'Validation epoch {:<5}'.format(epoch),
(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:
+ 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']: