From 983201a83a2b69174d693cd850be90e80c914168 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 27 Sep 2017 11:43:58 -0500 Subject: [PATCH] Fix hard-coded vector width --- spacy/pipeline.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/pipeline.pyx b/spacy/pipeline.pyx index 717a1bd3f..f7e05ece7 100644 --- a/spacy/pipeline.pyx +++ b/spacy/pipeline.pyx @@ -553,9 +553,10 @@ class NeuralLabeller(NeuralTagger): self.labels[label] = len(self.labels) print(len(self.labels)) if self.model is True: + token_vector_width = util.env_opt('token_vector_width') self.model = chain( tok2vec, - Softmax(len(self.labels), 128) + Softmax(len(self.labels), token_vector_width) ) link_vectors_to_models(self.vocab)