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
2c9a3115
Commit
2c9a3115
authored
Jul 23, 2019
by
thomwolf
Browse files
fix #858
parent
fec76a48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/run_glue.py
examples/run_glue.py
+1
-1
No files found.
examples/run_glue.py
View file @
2c9a3115
...
@@ -256,7 +256,7 @@ def load_and_cache_examples(args, task, tokenizer, evaluate=False):
...
@@ -256,7 +256,7 @@ def load_and_cache_examples(args, task, tokenizer, evaluate=False):
cls_token_at_end
=
bool
(
args
.
model_type
in
[
'xlnet'
]),
# xlnet has a cls token at the end
cls_token_at_end
=
bool
(
args
.
model_type
in
[
'xlnet'
]),
# xlnet has a cls token at the end
cls_token
=
tokenizer
.
cls_token
,
cls_token
=
tokenizer
.
cls_token
,
sep_token
=
tokenizer
.
sep_token
,
sep_token
=
tokenizer
.
sep_token
,
cls_token_segment_id
=
2
if
args
.
model_type
in
[
'xlnet'
]
else
1
,
cls_token_segment_id
=
2
if
args
.
model_type
in
[
'xlnet'
]
else
0
,
pad_on_left
=
bool
(
args
.
model_type
in
[
'xlnet'
]),
# pad on the left for xlnet
pad_on_left
=
bool
(
args
.
model_type
in
[
'xlnet'
]),
# pad on the left for xlnet
pad_token_segment_id
=
4
if
args
.
model_type
in
[
'xlnet'
]
else
0
)
pad_token_segment_id
=
4
if
args
.
model_type
in
[
'xlnet'
]
else
0
)
if
args
.
local_rank
in
[
-
1
,
0
]:
if
args
.
local_rank
in
[
-
1
,
0
]:
...
...
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