HierarchicalAttentionNetworks icon indicating copy to clipboard operation
HierarchicalAttentionNetworks copied to clipboard

Masking error

Open alina-le opened this issue 5 years ago • 3 comments

Trying to run the network in Google Colab, throws an error due to the mask dimensions:

Bildschirmfoto 2020-01-24 um 09 52 10

Running it on the computer returns ValueError: Dimensions must be equal, but are 15 and 100 for 'hierarchical_attention_network_2/mul' (op: 'Mul') with input shapes: [?,15], [?,15,100].

Any help on how to fix this much appreciated, Cheers!

alina-le avatar Jan 24 '20 08:01 alina-le

Trying to run the network in Google Colab, throws an error due to the mask dimensions:

Running it on the computer returns ValueError: Dimensions must be equal, but are 15 and 100 for 'hierarchical_attention_network_2/mul' (op: 'Mul') with input shapes: [?,15], [?,15,100]. Any help on how to fix this much appreciated, Cheers!

I have met the same problem, somebody comes to help me!

yufengjiao avatar Feb 15 '20 06:02 yufengjiao

removing 'mask_zero=True' in the embedding layer definition fixed the error for me. Hope it helps!

killerB97 avatar Oct 30 '20 08:10 killerB97

Hi, it fixed the problem but the model predicts padding (0 class). Any explanation for this ?

UrszulaCzerwinska avatar May 12 '21 15:05 UrszulaCzerwinska