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
a2d4950f
Commit
a2d4950f
authored
Sep 20, 2019
by
Maxpa1n
Committed by
Julien Chaumond
Sep 20, 2019
Browse files
fix annotation
parent
9f995b99
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
pytorch_transformers/tokenization_xlnet.py
pytorch_transformers/tokenization_xlnet.py
+4
-4
No files found.
pytorch_transformers/tokenization_xlnet.py
View file @
a2d4950f
...
...
@@ -183,8 +183,8 @@ class XLNetTokenizer(PreTrainedTokenizer):
def
add_special_tokens_single_sentence
(
self
,
token_ids
):
"""
Adds special tokens to a sequence
pair
for sequence classification tasks.
An XLNet sequence
pair
has the following format:
A [SEP] B
[SEP][CLS]
Adds special tokens to a sequence for sequence classification tasks.
An XLNet sequence has the following format:
X
[SEP][CLS]
"""
sep
=
[
self
.
sep_token_id
]
cls
=
[
self
.
cls_token_id
]
...
...
@@ -192,8 +192,8 @@ class XLNetTokenizer(PreTrainedTokenizer):
def
add_special_tokens_sentences_pair
(
self
,
token_ids_0
,
token_ids_1
):
"""
Adds special tokens to a sequence for sequence classification tasks.
An XLNet sequence has the following format:
X
[SEP][CLS]
Adds special tokens to a sequence
pair
for sequence classification tasks.
An XLNet sequence
pair
has the following format:
A [SEP] B
[SEP][CLS]
"""
sep
=
[
self
.
sep_token_id
]
cls
=
[
self
.
cls_token_id
]
...
...
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