transform

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

commit 24057ca725bd1467abdac8850aa28bd1ec0b355d
parent 996d461a6fb8dfe4da9c8298474ec5e87a144c7e
Author: Étienne Simon <esimon@esimon.eu>
Date:   Fri, 18 Apr 2014 15:57:41 +0200

Broadcast normalisation

Diffstat:
Membeddings.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/embeddings.py b/embeddings.py @@ -50,4 +50,4 @@ class Embeddings(object): def normalise_updates(self): """ Normalise the embeddings' L2 norm to 1. """ - return [(self.E, self.E / T.sqrt(T.sum(self.E **2, axis=1)))] + return [(self.E, self.E / T.sqrt(T.sum(self.E **2, axis=1)).dimshuffle(0, 'x'))]