transform

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

commit 7cb97ecd8c457d0cc0712148b927620fc047558e
parent a716989c34d296492ae87b6e0c1537897b5a62ce
Author: Étienne Simon <esimon@esimon.eu>
Date:   Fri, 18 Apr 2014 17:51:31 +0200

Change validation and epoch numbering

Diffstat:
Mmodel.py | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/model.py b/model.py @@ -131,8 +131,8 @@ class Model(object): number_epoch = self.config['number of epoch'] for epoch in xrange(number_epoch): - if epoch % validation_frequency == 0: - self.validate(epoch) + if (epoch+1) % validation_frequency == 0: + self.validate(epoch+1) for (relation, left_positive, right_positive, left_negative, right_negative) in self.dataset.training_minibatch(batch_size): self.train_function(relation, left_positive, right_positive, left_negative, right_negative)