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
c4d4f3ec
Commit
c4d4f3ec
authored
Sep 11, 2019
by
LysandreJik
Browse files
Updated DistilBERT test to reflect the sequence encoding
parent
d572d702
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
pytorch_transformers/tests/tokenization_distilbert_test.py
pytorch_transformers/tests/tokenization_distilbert_test.py
+2
-2
No files found.
pytorch_transformers/tests/tokenization_dilbert_test.py
→
pytorch_transformers/tests/tokenization_di
sti
lbert_test.py
View file @
c4d4f3ec
...
...
@@ -39,8 +39,8 @@ class DistilBertTokenizationTest(BertTokenizationTest):
encoded_sentence
=
tokenizer
.
add_special_tokens_single_sentence
(
text
)
encoded_pair
=
tokenizer
.
add_special_tokens_sentences_pair
(
text
,
text_2
)
assert
encoded_sentence
==
[
101
]
+
text
+
[
102
]
assert
encoded_pair
==
[
101
]
+
text
+
[
102
]
+
text_2
+
[
102
]
assert
encoded_sentence
==
text
assert
encoded_pair
==
text
+
[
102
]
+
text_2
if
__name__
==
'__main__'
:
unittest
.
main
()
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