From eb9ba61517e4e7f39b5521313e797bdbbf6740af Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 5 Oct 2020 15:29:49 +0200 Subject: [PATCH] Format --- spacy/ml/models/tok2vec.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spacy/ml/models/tok2vec.py b/spacy/ml/models/tok2vec.py index 4abc1bee6..6e5aed77b 100644 --- a/spacy/ml/models/tok2vec.py +++ b/spacy/ml/models/tok2vec.py @@ -103,17 +103,18 @@ def MultiHashEmbed_v1( here as a temporary compatibility.""" return MultiHashEmbed( width=width, - rows=rows, + rows=rows, attrs=[NORM, PREFIX, SUFFIX, SHAPE] if also_embed_subwords else [NORM], - include_static_vectors=also_use_static_vectors + include_static_vectors=also_use_static_vectors, ) + @registry.architectures.register("spacy.MultiHashEmbed.v2") def MultiHashEmbed( width: int, rows: int, attrs: Union[List[Union[str, int]], Dict[Union[str, int], float]], - include_static_vectors: bool + include_static_vectors: bool, ) -> Model[List[Doc], List[Floats2d]]: """Construct an embedding layer that separately embeds a number of lexical attributes using hash embedding, concatenates the results, and passes it