From 3d22ccf4954fabc5bbbdf766b6a3ad3a8609692d Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 7 Oct 2017 07:16:41 -0500 Subject: [PATCH] Update default hyper-parameters --- spacy/syntax/nn_parser.pyx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spacy/syntax/nn_parser.pyx b/spacy/syntax/nn_parser.pyx index b5f218d75..fdcf1d2d1 100644 --- a/spacy/syntax/nn_parser.pyx +++ b/spacy/syntax/nn_parser.pyx @@ -239,13 +239,13 @@ cdef class Parser: """ @classmethod def Model(cls, nr_class, **cfg): - depth = util.env_opt('parser_hidden_depth', cfg.get('hidden_depth', 1)) + depth = util.env_opt('parser_hidden_depth', cfg.get('hidden_depth', 2)) token_vector_width = util.env_opt('token_vector_width', cfg.get('token_vector_width', 128)) - hidden_width = util.env_opt('hidden_width', cfg.get('hidden_width', 200)) - parser_maxout_pieces = util.env_opt('parser_maxout_pieces', cfg.get('maxout_pieces', 3)) + hidden_width = util.env_opt('hidden_width', cfg.get('hidden_width', 128)) + parser_maxout_pieces = util.env_opt('parser_maxout_pieces', cfg.get('maxout_pieces', 1)) embed_size = util.env_opt('embed_size', cfg.get('embed_size', 7000)) - hist_size = util.env_opt('history_feats', cfg.get('hist_size', 0)) - hist_width = util.env_opt('history_width', cfg.get('hist_width', 0)) + hist_size = util.env_opt('history_feats', cfg.get('hist_size', 4)) + hist_width = util.env_opt('history_width', cfg.get('hist_width', 16)) if hist_size >= 1 and depth == 0: raise ValueError("Inconsistent hyper-params: " "history_feats >= 1 but parser_hidden_depth==0")