You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let’s say we have a sequence ABCDE, BERT-like masking would result in the following:
Inputs
A
MASKED
C
MASKED
E
Targets
MASKED
B
MASKED
D
MASKED
Note, the number of target items might differ for different samples in the batch. We should ensure that we have at least one target and at most len(seq) - 1
The class that’s responsible for masking could roughly look like:
BERT-like masking
Let’s say we have a sequence
ABCDE
, BERT-like masking would result in the following:MASKED
MASKED
MASKED
MASKED
MASKED
Note, the number of target items might differ for different samples in the batch. We should ensure that we have at least one target and at most
len(seq) - 1
The class that’s responsible for masking could roughly look like:
We want to make use of standard Keras functionality w.r.t. masking. Some useful links:
tf.RaggedTensor
stensorflow_text
The text was updated successfully, but these errors were encountered: