Closed adamklec closed 5 years ago
that's definitely an important feature, I will look into it and see if i can add that in or if you are interested you can also try to look into adding that feature.
When you use mask_zero = True, you must use it on ALL your next layers.
BiDirectionLSTM(64, 64, return_sequences=True, mask_zero=True)
should work!
Hello. My sequences are of varying length so many of them are 0 padded. From what I understand the correct way to treat 0 padded sequences is with mask_zero=True on an embedding layer.
text_model = Sequential() text_model.add(Embedding(max_features, 64, mask_zero=True)) text_model.add(BiDirectionLSTM(64, 64, return_sequences=True))
The above code raises the following exception: "Exception: Cannot connect non-masking layer to layer with masked output"
Do you have any plans to support masking? It seems like an important feature for dealing with sequences.