From 04ae1c01f1c37f60b1ba63cdd7a7af5eb1586bd3 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 6 May 2017 18:21:02 +0200 Subject: [PATCH] Learns things --- bin/parser/train_ud.py | 5 ++--- spacy/_ml.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/parser/train_ud.py b/bin/parser/train_ud.py index 610fe4b94..df8099d15 100644 --- a/bin/parser/train_ud.py +++ b/bin/parser/train_ud.py @@ -135,10 +135,9 @@ def main(lang_name, train_loc, dev_loc, model_dir, clusters_loc=None): encoder = TokenVectorEncoder(vocab) parser = DependencyParser(vocab, actions=actions, features=features, L1=0.0) - Xs, ys = organize_data(vocab, train_sents) - Xs = Xs[:10] - ys = ys[:10] + Xs = Xs[:100] + ys = ys[:100] with encoder.model.begin_training(Xs[:100], ys[:100]) as (trainer, optimizer): docs = list(Xs) for doc in docs: diff --git a/spacy/_ml.py b/spacy/_ml.py index 39f2a654b..8ab86488d 100644 --- a/spacy/_ml.py +++ b/spacy/_ml.py @@ -161,8 +161,8 @@ def build_tok2vec(lang, width, depth=2, embed_size=1000): #(static | prefix | suffix | shape) (lower | prefix | suffix | shape | tag) >> Maxout(width, width*5) - >> (ExtractWindow(nW=1) >> Maxout(width, width*3)) - >> (ExtractWindow(nW=1) >> Maxout(width, width*3)) + #>> (ExtractWindow(nW=1) >> Maxout(width, width*3)) + #>> (ExtractWindow(nW=1) >> Maxout(width, width*3)) ) ) return tok2vec