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
ModelZoo
ResNet50_tensorflow
Commits
028f6acd
Commit
028f6acd
authored
Jan 17, 2020
by
Chen Chen
Committed by
A. Unique TensorFlower
Jan 17, 2020
Browse files
Fix squad v2.0 prediction.
PiperOrigin-RevId: 290353330
parent
97e04472
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
official/nlp/bert/run_squad.py
official/nlp/bert/run_squad.py
+6
-0
No files found.
official/nlp/bert/run_squad.py
View file @
028f6acd
...
@@ -69,6 +69,10 @@ flags.DEFINE_bool(
...
@@ -69,6 +69,10 @@ flags.DEFINE_bool(
'do_lower_case'
,
True
,
'do_lower_case'
,
True
,
'Whether to lower case the input text. Should be True for uncased '
'Whether to lower case the input text. Should be True for uncased '
'models and False for cased models.'
)
'models and False for cased models.'
)
flags
.
DEFINE_float
(
'null_score_diff_threshold'
,
0.0
,
'If null_score - best_non_null is greater than the threshold, '
'predict null. This is only used for SQuAD v2.'
)
flags
.
DEFINE_bool
(
flags
.
DEFINE_bool
(
'verbose_logging'
,
False
,
'verbose_logging'
,
False
,
'If true, all of the warnings related to data processing will be printed. '
'If true, all of the warnings related to data processing will be printed. '
...
@@ -366,6 +370,8 @@ def predict_squad(strategy, input_meta_data):
...
@@ -366,6 +370,8 @@ def predict_squad(strategy, input_meta_data):
output_prediction_file
,
output_prediction_file
,
output_nbest_file
,
output_nbest_file
,
output_null_log_odds_file
,
output_null_log_odds_file
,
version_2_with_negative
=
version_2_with_negative
,
null_score_diff_threshold
=
FLAGS
.
null_score_diff_threshold
,
verbose
=
FLAGS
.
verbose_logging
)
verbose
=
FLAGS
.
verbose_logging
)
...
...
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