mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 02:36:32 +03:00
Dont assume pretrained_vectors cfg set in build_tagger
This commit is contained in:
parent
f8dd905a24
commit
4555e3e251
|
@ -438,7 +438,7 @@ def build_tagger_model(nr_class, **cfg):
|
||||||
token_vector_width = cfg['token_vector_width']
|
token_vector_width = cfg['token_vector_width']
|
||||||
else:
|
else:
|
||||||
token_vector_width = util.env_opt('token_vector_width', 128)
|
token_vector_width = util.env_opt('token_vector_width', 128)
|
||||||
pretrained_vectors = cfg['pretrained_vectors']
|
pretrained_vectors = cfg.get('pretrained_vectors')
|
||||||
with Model.define_operators({'>>': chain, '+': add}):
|
with Model.define_operators({'>>': chain, '+': add}):
|
||||||
if 'tok2vec' in cfg:
|
if 'tok2vec' in cfg:
|
||||||
tok2vec = cfg['tok2vec']
|
tok2vec = cfg['tok2vec']
|
||||||
|
|
Loading…
Reference in New Issue
Block a user