Updated the GLUE data processor. Corrections to RoBERTa and XLNet.

This commit is contained in:
LysandreJik committed 2019-09-19 10:55:06 +02:00
1 parent c3df2136e1
commit bac332fec0
3 files changed
+4 -56

No files matched your search

+2 -1
View File
@@ -198,10 +198,11 @@ class XLNetTokenizer(PreTrainedTokenizer):
sep = [self.sep_token_id]
cls = [self.cls_token_id]
cls_segment_ids = [2]
if output_mask:
return (
token_ids_0 + sep + token_ids_1 + sep + cls,
[0] * len(token_ids_0 + sep) + [1] * len(token_ids_1 + sep + cls)
[0] * len(token_ids_0 + sep) + [1] * len(token_ids_1 + sep) + cls_segment_ids
)
else:
return token_ids_0 + sep + token_ids_1 + sep + cls