"...git@developer.sourcefind.cn:modelzoo/bladedisc_deepmd.git" did not exist on "56d2b104df15b509ff1c7417a923bc25312440dd"
Unverified Commit f3d18c71 authored by Thomas Wolf's avatar Thomas Wolf Committed by GitHub
Browse files

Merge pull request #1152 from epwalsh/fix-special-tokens

fix adding special tokens
parents d483cd8e 07e21307
......@@ -784,7 +784,7 @@ class PreTrainedTokenizer(object):
all_toks = []
set_attr = self.special_tokens_map
for attr_value in set_attr.values():
all_toks = all_toks + (attr_value if isinstance(attr_value, (list, tuple)) else [attr_value])
all_toks = all_toks + (list(attr_value) if isinstance(attr_value, (list, tuple)) else [attr_value])
all_toks = list(set(all_toks))
return all_toks
......
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