Skip to content

Commit de3e79c

Browse files
wawltorZeyuChen
andauthored
resolve the windows problem in skep task (#1146)
Co-authored-by: Zeyu Chen <[email protected]>
1 parent 2786381 commit de3e79c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddlenlp/transformers/skep/modeling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def forward(self,
342342
"""
343343
if attention_mask is None:
344344
attention_mask = paddle.unsqueeze(
345-
(input_ids == self.pad_token_id
345+
(input_ids.astype("int64") == self.pad_token_id
346346
).astype(self.pooler.dense.weight.dtype) * -1e9,
347347
axis=[1, 2])
348348
embedding_output = self.embeddings(

0 commit comments

Comments
 (0)