From 1a37a2c0a0b41b5b719a6d62b11d85c0c139baed Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 27 Sep 2017 11:48:07 -0500 Subject: [PATCH] Update training defaults --- spacy/_ml.py | 2 +- spacy/syntax/nn_parser.pyx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spacy/_ml.py b/spacy/_ml.py index 2e95aa55b..22a501f0f 100644 --- a/spacy/_ml.py +++ b/spacy/_ml.py @@ -505,7 +505,7 @@ def getitem(i): return layerize(getitem_fwd) def build_tagger_model(nr_class, **cfg): - embed_size = util.env_opt('embed_size', 4000) + embed_size = util.env_opt('embed_size', 1000) if 'token_vector_width' in cfg: token_vector_width = cfg['token_vector_width'] else: diff --git a/spacy/syntax/nn_parser.pyx b/spacy/syntax/nn_parser.pyx index 99099cad8..830aac551 100644 --- a/spacy/syntax/nn_parser.pyx +++ b/spacy/syntax/nn_parser.pyx @@ -240,12 +240,12 @@ cdef class Parser: Base class of the DependencyParser and EntityRecognizer. """ @classmethod - def Model(cls, nr_class, token_vector_width=128, hidden_width=300, depth=1, **cfg): + def Model(cls, nr_class, token_vector_width=128, hidden_width=200, depth=1, **cfg): depth = util.env_opt('parser_hidden_depth', depth) token_vector_width = util.env_opt('token_vector_width', token_vector_width) hidden_width = util.env_opt('hidden_width', hidden_width) parser_maxout_pieces = util.env_opt('parser_maxout_pieces', 2) - embed_size = util.env_opt('embed_size', 4000) + embed_size = util.env_opt('embed_size', 1000) tok2vec = Tok2Vec(token_vector_width, embed_size, pretrained_dims=cfg.get('pretrained_dims', 0)) tok2vec = chain(tok2vec, flatten)