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
fc724b3e
Commit
fc724b3e
authored
Jun 02, 2020
by
A. Unique TensorFlower
Browse files
A minor change to model_training_utils of BERT.
PiperOrigin-RevId: 314417394
parent
3d99cc89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
official/nlp/bert/model_training_utils.py
official/nlp/bert/model_training_utils.py
+2
-3
No files found.
official/nlp/bert/model_training_utils.py
View file @
fc724b3e
...
@@ -235,10 +235,9 @@ def run_customized_training_loop(
...
@@ -235,10 +235,9 @@ def run_customized_training_loop(
'TPUStrategy should not run eagerly as it heavily relies on graph'
'TPUStrategy should not run eagerly as it heavily relies on graph'
' optimization for the distributed system.'
)
' optimization for the distributed system.'
)
if
eval_input_fn
and
(
eval_steps
is
None
or
metric_fn
is
None
)
:
if
eval_input_fn
and
eval_steps
is
None
:
raise
ValueError
(
raise
ValueError
(
'`eval_step` and `metric_fn` are required when `eval_input_fn ` '
'`eval_step` is required when `eval_input_fn ` is not none.'
)
'is not none.'
)
if
metric_fn
and
not
callable
(
metric_fn
):
if
metric_fn
and
not
callable
(
metric_fn
):
raise
ValueError
(
raise
ValueError
(
'if `metric_fn` is specified, metric_fn must be a callable.'
)
'if `metric_fn` is specified, metric_fn must be a callable.'
)
...
...
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