Fix vector linkage

This commit is contained in:
Matthew Honnibal 2017-09-22 20:11:52 -05:00
parent 4348c479fc
commit 5a7fd0fd36
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,7 @@ from .lang.tag_map import TAG_MAP
from .lang.lex_attrs import LEX_ATTRS from .lang.lex_attrs import LEX_ATTRS
from . import util from . import util
from .scorer import Scorer from .scorer import Scorer
from ._ml import link_vectors_to_models
class BaseDefaults(object): class BaseDefaults(object):
@ -370,6 +371,7 @@ class Language(object):
self.vocab.vectors.data) self.vocab.vectors.data)
else: else:
device = None device = None
link_vectors_to_models(self.vocab)
for proc in self.pipeline: for proc in self.pipeline:
if hasattr(proc, 'begin_training'): if hasattr(proc, 'begin_training'):
context = proc.begin_training(get_gold_tuples(), context = proc.begin_training(get_gold_tuples(),