transform

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

commit 3d42500856e4bf066482b749e3a824f214791c47
parent 5885567c2353298286e3594296e66c10968ef864
Author: Étienne Simon <esimon@esimon.eu>
Date:   Wed, 30 Apr 2014 19:02:52 +0200

Fix bug at thread start

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

diff --git a/meta_model.py b/meta_model.py @@ -59,8 +59,8 @@ class Meta_model(object): def train(self): """ Train the model. """ threads = [ threading.Thread(target=model.train, args=()) for model in self.models ] - log('# Starting thread for model {0}\n'.format(model.tag)) - for thread in threads: + for (model, thread) in zip(self.models, threads): + log('# Starting thread for model {0}\n'.format(model.tag)) thread.start() log('# Waiting for children to join\n') for thread in threads: