Pass tagger options in begin_training

This commit is contained in:
Matthew Honnibal 2018-12-17 23:08:31 +00:00
parent 7c504b6ddb
commit 95fc0176d1
1 changed files with 3 additions and 0 deletions

View File

@ -711,6 +711,9 @@ class Tagger(Pipe):
exc=vocab.morphology.exc)
self.cfg['pretrained_vectors'] = kwargs.get('pretrained_vectors')
if self.model is True:
for hp in ['token_vector_width', 'conv_depth']:
if hp in kwargs:
self.cfg[hp] = kwargs[hp]
self.model = self.Model(self.vocab.morphology.n_tags, **self.cfg)
link_vectors_to_models(self.vocab)
if sgd is None: