Check lengths match

This commit is contained in:
Matthew Honnibal 2020-10-05 20:02:45 +02:00
parent db84d175c3
commit e50047f1c5
1 changed files with 2 additions and 0 deletions

View File

@ -136,6 +136,8 @@ def MultiHashEmbed(
include_static_vectors (bool): Whether to also use static word vectors.
Requires a vectors table to be loaded in the Doc objects' vocab.
"""
if len(rows) != len(attrs):
raise ValueError(f"Mismatched lengths: {len(rows)} vs {len(attrs)}")
seed = 7
def make_hash_embed(index):