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
9da3a081
Commit
9da3a081
authored
Feb 12, 2021
by
Le Hou
Committed by
A. Unique TensorFlower
Feb 12, 2021
Browse files
Internal change
PiperOrigin-RevId: 357284280
parent
537aaad5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
official/nlp/continuous_finetune_lib.py
official/nlp/continuous_finetune_lib.py
+5
-0
official/nlp/continuous_finetune_lib_test.py
official/nlp/continuous_finetune_lib_test.py
+3
-0
No files found.
official/nlp/continuous_finetune_lib.py
View file @
9da3a081
...
...
@@ -145,6 +145,11 @@ def run_continuous_finetune(
min_interval_secs
=
10
,
timeout
=
params
.
trainer
.
continuous_eval_timeout
,
timeout_fn
=
timeout_fn
):
# If there are checkpoints, they might be the finetune checkpoint of a
# different pretrained checkpoint. So we just remove all checkpoints.
train_utils
.
remove_ckpts
(
model_dir
)
with
distribution_strategy
.
scope
():
global_step
=
train_utils
.
read_global_step_from_checkpoint
(
pretrain_ckpt
)
# Replaces params.task.init_checkpoint to make sure that we load
...
...
official/nlp/continuous_finetune_lib_test.py
View file @
9da3a081
...
...
@@ -90,6 +90,9 @@ class ContinuousFinetuneTest(tf.test.TestCase, parameterized.TestCase):
pretrain_steps
=
pretrain_steps
)
self
.
assertIn
(
'best_acc'
,
eval_metrics
)
self
.
assertFalse
(
tf
.
io
.
gfile
.
exists
(
os
.
path
.
join
(
FLAGS
.
model_dir
,
'checkpoint'
)))
if
__name__
==
'__main__'
:
tf
.
test
.
main
()
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