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
e5fe2bb5
Unverified
Commit
e5fe2bb5
authored
Jul 05, 2019
by
Thomas Wolf
Committed by
GitHub
Jul 05, 2019
Browse files
Merge pull request #745 from leimao/leimao
fix evaluation bug
parents
dad3c7a4
64b2a828
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
examples/run_squad.py
examples/run_squad.py
+3
-1
No files found.
examples/run_squad.py
View file @
e5fe2bb5
...
...
@@ -336,7 +336,9 @@ def main():
output_args_file
=
os
.
path
.
join
(
args
.
output_dir
,
'training_args.bin'
)
torch
.
save
(
args
,
output_args_file
)
else
:
model
=
BertForQuestionAnswering
.
from_pretrained
(
args
.
bert_model
)
# Load a trained model and vocabulary that you have fine-tuned
model
=
BertForQuestionAnswering
.
from_pretrained
(
args
.
output_dir
)
tokenizer
=
BertTokenizer
.
from_pretrained
(
args
.
output_dir
,
do_lower_case
=
args
.
do_lower_case
)
model
.
to
(
device
)
...
...
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