transform

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

commit 72e1c4ed6aceb97bf016c84df82cbfadd9d4612d
parent d20bc216b29903a6fa9e7a98b79349b02b4f5a2e
Author: Étienne Simon <esimon@esimon.eu>
Date:   Mon, 26 May 2014 16:44:58 +0200

Use sum instead of mean over mini-batches

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

diff --git a/model.py b/model.py @@ -81,8 +81,8 @@ class Model(object): violating_margin_left = score_left>0 violating_margin_right = score_right>0 - criterion_left = T.mean(violating_margin_left*score_left) - criterion_right = T.mean(violating_margin_right*score_right) + criterion_left = T.sum(violating_margin_left*score_left) + criterion_right = T.sum(violating_margin_right*score_right) criterion = criterion_left + criterion_right self.train_function = theano.function(inputs=inputs, outputs=[criterion], updates=self.updates(criterion))