This commit is contained in:
Matthew Honnibal 2020-07-28 13:59:46 +02:00
parent 034d803b7a
commit fe0cdcd461

View File

@ -50,7 +50,8 @@ def HashEmbed(
width, width,
rows if feature == NORM else rows // 2, rows if feature == NORM else rows // 2,
column=cols.index(feature), column=cols.index(feature),
seed=seed seed=seed,
dropout=0.0
) )
if also_embed_subwords: if also_embed_subwords:
@ -67,14 +68,14 @@ def HashEmbed(
model = chain( model = chain(
concatenate( concatenate(
chain(FeatureExtractor(cols), concatenate(*embeddings)), chain(FeatureExtractor(cols), concatenate(*embeddings)),
StaticVectors(width, dropout=dropout) StaticVectors(width, dropout=0.0)
), ),
Maxout(width, dropout=dropout, normalize=True) Maxout(width, pieces=3, dropout=0.0, normalize=True)
) )
else: else:
model = chain( model = chain(
chain(FeatureExtractor(cols), concatenate(*embeddings)), chain(FeatureExtractor(cols), concatenate(*embeddings)),
Maxout(width, concat_size, dropout=dropout, normalize=True) Maxout(width, pieces=3, dropout=0.0, normalize=True)
) )
return model return model