Fix wiring of pre-trained vectors in parser loading

This commit is contained in:
Matthew Honnibal 2017-09-17 05:46:55 -05:00
parent 8f913a74ca
commit 31c2e91c35
1 changed files with 1 additions and 0 deletions

View File

@ -825,6 +825,7 @@ cdef class Parser:
if 'model' not in exclude: if 'model' not in exclude:
path = util.ensure_path(path) path = util.ensure_path(path)
if self.model is True: if self.model is True:
self.cfg['pretrained_dims'] = self.vocab.vectors_length
self.model, cfg = self.Model(**self.cfg) self.model, cfg = self.Model(**self.cfg)
else: else:
cfg = {} cfg = {}