Merge branch 'develop' of https://github.com/explosion/spaCy into develop

This commit is contained in:
Ines Montani 2020-08-05 16:01:11 +02:00
commit 586d695775
2 changed files with 2 additions and 1 deletions

View File

@ -144,6 +144,7 @@ def train(
max_steps=T_cfg["max_steps"], max_steps=T_cfg["max_steps"],
eval_frequency=T_cfg["eval_frequency"], eval_frequency=T_cfg["eval_frequency"],
raw_text=None, raw_text=None,
exclude=frozen_components
) )
msg.info(f"Training. Initial learn rate: {optimizer.learn_rate}") msg.info(f"Training. Initial learn rate: {optimizer.learn_rate}")
print_row = setup_printer(T_cfg, nlp) print_row = setup_printer(T_cfg, nlp)

View File

@ -355,7 +355,7 @@ class TextCategorizer(Pipe):
for cat in y.cats: for cat in y.cats:
self.add_label(cat) self.add_label(cat)
self.require_labels() self.require_labels()
docs = [Doc(Vocab(), words=["hello"])] docs = [Doc(self.vocab, words=["hello"])]
truths, _ = self._examples_to_truth(examples) truths, _ = self._examples_to_truth(examples)
self.set_output(len(self.labels)) self.set_output(len(self.labels))
self.model.initialize(X=docs, Y=truths) self.model.initialize(X=docs, Y=truths)