Skip to content

Commit 12e5914

Browse files
committed
fixed masking
1 parent b31f403 commit 12e5914

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/generative/text_generation_fnet.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,8 @@ def call(self, inputs, encoder_outputs, mask=None):
262262

263263
if mask is not None:
264264
padding_mask = ops.cast(mask[:, None, :], "int32")
265-
padding_mask = ops.minimum(padding_mask, causal_mask)
266265
else:
267-
padding_mask = causal_mask
266+
padding_mask = None
268267

269268
attention_output_1 = self.attention_1(
270269
query=inputs, value=inputs, key=inputs, attention_mask=causal_mask

0 commit comments

Comments
 (0)