Closed Yifan-Gao closed 4 years ago
https://github.com/shmsw25/AmbigQA/blob/74f9ff85da81bd2925fca2ddb6ea59437335631b/codes/Data.py#L201-L217
After line 207, I think the attention_mask should also be cropped as attention_mask[idx] = curr_attention_mask[:end_of_question]. Otherwise, it will not be aligned with input_ids.
attention_mask
attention_mask[idx] = curr_attention_mask[:end_of_question]
input_ids
You are right, thanks for catching it! Fixed it now.
thanks!
https://github.com/shmsw25/AmbigQA/blob/74f9ff85da81bd2925fca2ddb6ea59437335631b/codes/Data.py#L201-L217
After line 207, I think the
attention_mask
should also be cropped asattention_mask[idx] = curr_attention_mask[:end_of_question]
. Otherwise, it will not be aligned withinput_ids
.