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
9c50e961
Commit
9c50e961
authored
Nov 25, 2019
by
Chen Chen
Committed by
A. Unique TensorFlower
Nov 25, 2019
Browse files
Completely remove "use_keras_bert_for_squad" FLAG.
PiperOrigin-RevId: 282384787
parent
5b2575c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
7 deletions
+0
-7
official/benchmark/bert_squad_benchmark.py
official/benchmark/bert_squad_benchmark.py
+0
-1
official/nlp/bert/run_squad.py
official/nlp/bert/run_squad.py
+0
-6
No files found.
official/benchmark/bert_squad_benchmark.py
View file @
9c50e961
...
@@ -340,7 +340,6 @@ class BertSquadAccuracy(BertSquadBenchmarkBase):
...
@@ -340,7 +340,6 @@ class BertSquadAccuracy(BertSquadBenchmarkBase):
FLAGS
.
init_checkpoint
=
PRETRAINED_CHECKPOINT_PATH
FLAGS
.
init_checkpoint
=
PRETRAINED_CHECKPOINT_PATH
FLAGS
.
num_train_epochs
=
2
FLAGS
.
num_train_epochs
=
2
FLAGS
.
steps_per_loop
=
1
FLAGS
.
steps_per_loop
=
1
FLAGS
.
use_keras_bert_for_squad
=
True
def
_run_and_report_benchmark
(
self
,
def
_run_and_report_benchmark
(
self
,
use_ds
=
True
,
use_ds
=
True
,
...
...
official/nlp/bert/run_squad.py
View file @
9c50e961
...
@@ -80,8 +80,6 @@ flags.DEFINE_integer(
...
@@ -80,8 +80,6 @@ flags.DEFINE_integer(
'max_answer_length'
,
30
,
'max_answer_length'
,
30
,
'The maximum length of an answer that can be generated. This is needed '
'The maximum length of an answer that can be generated. This is needed '
'because the start and end predictions are not conditioned on one another.'
)
'because the start and end predictions are not conditioned on one another.'
)
flags
.
DEFINE_bool
(
'use_keras_bert_for_squad'
,
True
,
'Deprecated and will be removed soon.'
)
common_flags
.
define_common_bert_flags
()
common_flags
.
define_common_bert_flags
()
...
@@ -374,10 +372,6 @@ def main(_):
...
@@ -374,10 +372,6 @@ def main(_):
# Users should always run this script under TF 2.x
# Users should always run this script under TF 2.x
assert
tf
.
version
.
VERSION
.
startswith
(
'2.'
)
assert
tf
.
version
.
VERSION
.
startswith
(
'2.'
)
if
not
FLAGS
.
use_keras_bert_for_squad
:
raise
ValueError
(
'Old tf2 BERT is no longer supported. Please use keras BERT.'
)
with
tf
.
io
.
gfile
.
GFile
(
FLAGS
.
input_meta_data_path
,
'rb'
)
as
reader
:
with
tf
.
io
.
gfile
.
GFile
(
FLAGS
.
input_meta_data_path
,
'rb'
)
as
reader
:
input_meta_data
=
json
.
loads
(
reader
.
read
().
decode
(
'utf-8'
))
input_meta_data
=
json
.
loads
(
reader
.
read
().
decode
(
'utf-8'
))
...
...
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