diff --git a/website/docs/api/language.mdx b/website/docs/api/language.mdx index aea8e51bd..9831030d4 100644 --- a/website/docs/api/language.mdx +++ b/website/docs/api/language.mdx @@ -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 | diff --git a/website/docs/api/pipe.mdx b/website/docs/api/pipe.mdx index e5b33e50d..744186e18 100644 --- a/website/docs/api/pipe.mdx +++ b/website/docs/api/pipe.mdx @@ -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 |