waltzing schedule

This commit is contained in:
svlandeg 2020-08-19 19:53:00 +02:00
parent b96cd9fa5e
commit 7d9f00bdbf

View File

@ -282,17 +282,18 @@ concept of function registries. spaCy also uses the function registry for
language subclasses, model architecture, lookups and pipeline component language subclasses, model architecture, lookups and pipeline component
factories. factories.
<!-- TODO: improve example? -->
> #### Example > #### Example
> >
> ```python > ```python
> from typing import Iterator
> import spacy > import spacy
> from thinc.api import Model
> >
> @spacy.registry.architectures("CustomNER.v1") > @spacy.registry.schedules("waltzing.v1")
> def custom_ner(n0: int) -> Model: > def waltzing() -> Iterator[float]:
> return Model("custom", forward, dims={"nO": nO}) > i = 0
> while True:
> yield i % 3 + 1
> i += 1
> ``` > ```
| Registry name | Description | | Registry name | Description |