Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
cb6d54bf
Commit
cb6d54bf
authored
Dec 20, 2019
by
Lysandre
Browse files
Numpy compatibility for sentence piece
convert to int earlier
parent
ceae85ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
transformers/tokenization_utils.py
transformers/tokenization_utils.py
+1
-0
No files found.
transformers/tokenization_utils.py
View file @
cb6d54bf
...
...
@@ -1227,6 +1227,7 @@ class PreTrainedTokenizer(object):
return
self
.
_convert_id_to_token
(
ids
)
tokens
=
[]
for
index
in
ids
:
index
=
int
(
index
)
if
skip_special_tokens
and
index
in
self
.
all_special_ids
:
continue
if
index
in
self
.
added_tokens_decoder
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment