mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-22 18:12:00 +03:00
Adjsut example in docs
This commit is contained in:
parent
05a2f560ad
commit
000aa083f9
|
@ -352,8 +352,10 @@ the "catastrophic forgetting" problem. Please note that `Language.rehearse` need
|
|||
>
|
||||
> ```python
|
||||
> optimizer = nlp.resume_training()
|
||||
> update_losses = nlp.update(examples, sgd=optimizer)
|
||||
> rehearse_losses = nlp.rehearse(examples, sgd=optimizer)
|
||||
> update_losses = nlp.update(examples, sgd=None)
|
||||
> rehearse_losses = nlp.rehearse(examples, sgd=None)
|
||||
> for name, proc in nlp.pipeline:
|
||||
> proc.finish_update(optimizer)
|
||||
> ```
|
||||
|
||||
| Name | Description |
|
||||
|
|
|
@ -251,8 +251,9 @@ the "catastrophic forgetting" problem. Please note that `TrainablePipe.update` n
|
|||
> ```python
|
||||
> pipe = nlp.add_pipe("your_custom_pipe")
|
||||
> optimizer = nlp.resume_training()
|
||||
> update_losses = pipe.update(examples, sgd=optimizer)
|
||||
> rehearse_losses = pipe.rehearse(examples, sgd=optimizer)
|
||||
> update_losses = pipe.update(examples, sgd=None)
|
||||
> rehearse_losses = pipe.rehearse(examples, sgd=None)
|
||||
> pipe.finish_update(optimizer)
|
||||
> ```
|
||||
|
||||
| Name | Description |
|
||||
|
|
Loading…
Reference in New Issue
Block a user