From 07b41c38aedf49eed9615caea4e54cd621093f0b Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Mon, 19 Apr 2021 10:39:34 +0200 Subject: [PATCH] Register CharEmbed layer (#7805) --- spacy/ml/_character_embed.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/ml/_character_embed.py b/spacy/ml/_character_embed.py index f5c539c42..0ed28b859 100644 --- a/spacy/ml/_character_embed.py +++ b/spacy/ml/_character_embed.py @@ -3,8 +3,10 @@ from thinc.api import Model from thinc.types import Floats2d from ..tokens import Doc +from ..util import registry +@registry.layers("spacy.CharEmbed.v1") def CharacterEmbed(nM: int, nC: int) -> Model[List[Doc], List[Floats2d]]: # nM: Number of dimensions per character. nC: Number of characters. return Model(