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
3bffd2e8
Commit
3bffd2e8
authored
Aug 20, 2019
by
Peng Qi
Browse files
more fixes
parent
a368b877
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
examples/run_glue.py
examples/run_glue.py
+1
-1
examples/run_squad.py
examples/run_squad.py
+1
-1
No files found.
examples/run_glue.py
View file @
3bffd2e8
...
@@ -467,7 +467,7 @@ def main():
...
@@ -467,7 +467,7 @@ def main():
# Load a trained model and vocabulary that you have fine-tuned
# Load a trained model and vocabulary that you have fine-tuned
model
=
model_class
.
from_pretrained
(
args
.
output_dir
)
model
=
model_class
.
from_pretrained
(
args
.
output_dir
)
tokenizer
=
tokenizer_class
.
from_pretrained
(
args
.
output_dir
)
tokenizer
=
tokenizer_class
.
from_pretrained
(
args
.
output_dir
,
do_lower_case
=
args
.
do_lower_case
)
model
.
to
(
args
.
device
)
model
.
to
(
args
.
device
)
...
...
examples/run_squad.py
View file @
3bffd2e8
...
@@ -481,7 +481,7 @@ def main():
...
@@ -481,7 +481,7 @@ def main():
# Save the trained model and the tokenizer
# Save the trained model and the tokenizer
if
args
.
do_train
and
args
.
local_rank
==
-
1
or
torch
.
distributed
.
get_rank
()
==
0
:
if
args
.
do_train
and
(
args
.
local_rank
==
-
1
or
torch
.
distributed
.
get_rank
()
==
0
)
:
# Create output directory if needed
# Create output directory if needed
if
not
os
.
path
.
exists
(
args
.
output_dir
)
and
args
.
local_rank
in
[
-
1
,
0
]:
if
not
os
.
path
.
exists
(
args
.
output_dir
)
and
args
.
local_rank
in
[
-
1
,
0
]:
os
.
makedirs
(
args
.
output_dir
)
os
.
makedirs
(
args
.
output_dir
)
...
...
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