Unverified Commit 90df44f0 authored by Thomas Wolf's avatar Thomas Wolf Committed by GitHub
Browse files

Merge pull request #2063 from guillaume-be/special_tokens_mask_value_not_used

special_tokens_mask value was unused and calculated twice
parents 707f9e92 7f998b1b
......@@ -973,7 +973,7 @@ class PreTrainedTokenizer(object):
token_type_ids = [0] * len(ids) + ([1] * len(pair_ids) if pair else [])
if return_special_tokens_mask:
encoded_inputs["special_tokens_mask"] = self.get_special_tokens_mask(ids, pair_ids)
encoded_inputs["special_tokens_mask"] = special_tokens_mask
encoded_inputs["input_ids"] = sequence
if return_token_type_ids:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment