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
f4ff44a6
Unverified
Commit
f4ff44a6
authored
Feb 27, 2020
by
Cola
Committed by
GitHub
Feb 27, 2020
Browse files
Fix batch_encode_plus (#3041)
parent
b370cc7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
src/transformers/tokenization_utils.py
src/transformers/tokenization_utils.py
+1
-2
No files found.
src/transformers/tokenization_utils.py
View file @
f4ff44a6
...
...
@@ -1126,8 +1126,7 @@ class PreTrainedTokenizer(object):
input_ids
=
[]
for
ids_or_pair_ids
in
batch_text_or_text_pairs
:
if
isinstance
(
ids_or_pair_ids
,
(
list
,
tuple
)):
assert
len
(
ids_or_pair_ids
)
==
2
if
isinstance
(
ids_or_pair_ids
,
(
list
,
tuple
))
and
len
(
ids_or_pair_ids
)
==
2
:
ids
,
pair_ids
=
ids_or_pair_ids
else
:
ids
,
pair_ids
=
ids_or_pair_ids
,
None
...
...
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