mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
Merge branch 'develop' of https://github.com/explosion/spaCy into develop
This commit is contained in:
commit
586d695775
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user