Skip to content
Snippets Groups Projects
Commit 5f3b0849 authored by Alex Rubinsteyn's avatar Alex Rubinsteyn
Browse files

added comment to DropMask

parent 1a257560
No related branches found
No related tags found
No related merge requests found
from keras.layers import Layer
class DropMask(Layer):
"""
Sometimes we know that a mask is always going to contain 1s (and never 0s)
due to e.g. slicing the beginning of a sequence with a known min length.
In that case it can be useful to drop the sequence mask and feed the
activations to a layer which does not support masking (e.g. Dense).
"""
supports_masking = True
def call(self, x, mask):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment