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
wangsen
paddle_dbnet
Commits
90e2f2d6
Unverified
Commit
90e2f2d6
authored
Aug 22, 2022
by
littletomatodonkey
Committed by
GitHub
Aug 22, 2022
Browse files
fix nlp return token_type_ids (#7289)
parent
a40f64a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
ppocr/data/imaug/label_ops.py
ppocr/data/imaug/label_ops.py
+4
-1
No files found.
ppocr/data/imaug/label_ops.py
View file @
90e2f2d6
...
...
@@ -918,7 +918,10 @@ class VQATokenLabelEncode(object):
text
=
info
[
"text"
]
encode_res
=
self
.
tokenizer
.
encode
(
text
,
pad_to_max_seq_len
=
False
,
return_attention_mask
=
True
)
text
,
pad_to_max_seq_len
=
False
,
return_attention_mask
=
True
,
return_token_type_ids
=
True
)
if
not
self
.
add_special_ids
:
# TODO: use tok.all_special_ids to remove
...
...
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