Skip to content

Commit 5260996

Browse files
authored
fix 0 dim (#4192)
1 parent 1e63f61 commit 5260996

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddlenlp/transformers/t5/modeling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ def _shift_right(self, input_ids):
697697
# replace possible -100 values in labels by `pad_token_id`
698698
shifted_input_ids = paddle.where(
699699
shifted_input_ids == -100,
700-
paddle.assign(np.asarray(pad_token_id, dtype=data_type_converter(shifted_input_ids))),
700+
paddle.assign(np.asarray(pad_token_id, dtype=data_type_converter(shifted_input_ids)).reshape([1])),
701701
shifted_input_ids,
702702
)
703703

0 commit comments

Comments
 (0)