transform

old TransE-like models
git clone https://esimon.eu/repos/transform.git
Log | Files | Refs | README

commit 7f26ea262456312050e3d6c3e1d3aaf9039bd0b9
parent 4956fff0cdc7b0f86d791e9fd6d6d33a2263263e
Author: Étienne Simon <esimon@esimon.eu>
Date:   Thu, 17 Apr 2014 13:21:24 +0200

Fix spacing

Diffstat:
Mmodel.py | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/model.py b/model.py @@ -158,11 +158,14 @@ class Model(object): 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', + print >>sys.stderr, '(best so far, saving...', self.save(self.hyperparameters['best model save location']) - print >>sys.stderr, ')', + print >>sys.stderr, 'done)' + else: + print >>sys.stderr, '(best so far)' + else: + print >>sys.stderr, '' if self.hyperparameters['validate on training data']: (train_mean, train_top10) = self.error('train')