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
4cbdc7d9
"comfy/git@developer.sourcefind.cn:chenpangpang/ComfyUI.git" did not exist on "71666f248f769af073408a3475dd7a82a29d8247"
Commit
4cbdc7d9
authored
Dec 10, 2019
by
Pascal Voitot
Committed by
Lysandre Debut
Dec 13, 2019
Browse files
missed space
parent
dd2add9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
3 deletions
+1
-3
transformers/tests/tokenization_bert_test.py
transformers/tests/tokenization_bert_test.py
+0
-2
transformers/tests/tokenization_gpt2_test.py
transformers/tests/tokenization_gpt2_test.py
+1
-1
No files found.
transformers/tests/tokenization_bert_test.py
View file @
4cbdc7d9
...
@@ -112,8 +112,6 @@ class BertTokenizationTest(CommonTestCases.CommonTokenizerTester):
...
@@ -112,8 +112,6 @@ class BertTokenizationTest(CommonTestCases.CommonTokenizerTester):
(
f
"[CLS]
{
input
}
[SEP]"
).
lower
()
(
f
"[CLS]
{
input
}
[SEP]"
).
lower
()
)
)
def
test_is_whitespace
(
self
):
def
test_is_whitespace
(
self
):
self
.
assertTrue
(
_is_whitespace
(
u
" "
))
self
.
assertTrue
(
_is_whitespace
(
u
" "
))
self
.
assertTrue
(
_is_whitespace
(
u
"
\t
"
))
self
.
assertTrue
(
_is_whitespace
(
u
"
\t
"
))
...
...
transformers/tests/tokenization_gpt2_test.py
View file @
4cbdc7d9
...
@@ -72,7 +72,7 @@ class GPT2TokenizationTest(CommonTestCases.CommonTokenizerTester):
...
@@ -72,7 +72,7 @@ class GPT2TokenizationTest(CommonTestCases.CommonTokenizerTester):
new_toks
=
[
'[ABC]'
,
'[DEF]'
,
'GHI IHG'
]
new_toks
=
[
'[ABC]'
,
'[DEF]'
,
'GHI IHG'
]
tokenizer
.
add_tokens
(
new_toks
)
tokenizer
.
add_tokens
(
new_toks
)
input
=
"lower newer [ABC] [DEF] newer lower [ABC] GHI IHG newer lower[DEF]"
input
=
"lower newer [ABC] [DEF] newer lower [ABC] GHI IHG newer lower
[DEF]"
encoded
=
tokenizer
.
encode
(
input
)
encoded
=
tokenizer
.
encode
(
input
)
decoded
=
tokenizer
.
decode
(
encoded
)
decoded
=
tokenizer
.
decode
(
encoded
)
self
.
assertEqual
(
self
.
assertEqual
(
...
...
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