mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Format
This commit is contained in:
		
							parent
							
								
									7d93575f35
								
							
						
					
					
						commit
						eb9ba61517
					
				| 
						 | 
					@ -105,15 +105,16 @@ def MultiHashEmbed_v1(
 | 
				
			||||||
        width=width,
 | 
					        width=width,
 | 
				
			||||||
        rows=rows,
 | 
					        rows=rows,
 | 
				
			||||||
        attrs=[NORM, PREFIX, SUFFIX, SHAPE] if also_embed_subwords else [NORM],
 | 
					        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")
 | 
					@registry.architectures.register("spacy.MultiHashEmbed.v2")
 | 
				
			||||||
def MultiHashEmbed(
 | 
					def MultiHashEmbed(
 | 
				
			||||||
    width: int,
 | 
					    width: int,
 | 
				
			||||||
    rows: int,
 | 
					    rows: int,
 | 
				
			||||||
    attrs: Union[List[Union[str, int]], Dict[Union[str, int], float]],
 | 
					    attrs: Union[List[Union[str, int]], Dict[Union[str, int], float]],
 | 
				
			||||||
    include_static_vectors: bool
 | 
					    include_static_vectors: bool,
 | 
				
			||||||
) -> Model[List[Doc], List[Floats2d]]:
 | 
					) -> Model[List[Doc], List[Floats2d]]:
 | 
				
			||||||
    """Construct an embedding layer that separately embeds a number of lexical
 | 
					    """Construct an embedding layer that separately embeds a number of lexical
 | 
				
			||||||
    attributes using hash embedding, concatenates the results, and passes it
 | 
					    attributes using hash embedding, concatenates the results, and passes it
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user