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
393b32d2
Commit
393b32d2
authored
Sep 21, 2024
by
zhanggezhong
Browse files
Update resnet_ctl_imagenet_main.py
parent
66196533
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
official/legacy/image_classification/resnet/resnet_ctl_imagenet_main.py
...y/image_classification/resnet/resnet_ctl_imagenet_main.py
+6
-2
No files found.
official/legacy/image_classification/resnet/resnet_ctl_imagenet_main.py
View file @
393b32d2
...
...
@@ -151,14 +151,18 @@ def run(flags_obj):
checkpoint_interval
=
(
steps_per_loop
*
5
if
flags_obj
.
enable_checkpoint_and_export
else
None
)
summary_interval
=
steps_per_loop
if
flags_obj
.
enable_tensorboard
else
None
#多进程断点续训时使用该句代码创建多进程模型权重的保存路径
#unique_checkpoint_dir = os.path.join(flags_obj.model_dir, f'woeker_{num_index}')
checkpoint_manager
=
tf
.
train
.
CheckpointManager
(
runnable
.
checkpoint
,
directory
=
flags_obj
.
model_dir
,
#directory=unique_checkpoint_dir
max_to_keep
=
10
,
step_counter
=
runnable
.
global_step
,
checkpoint_interval
=
checkpoint_interval
)
#多进程断点续训时加载模型权重的方式
# runnable.checkpoit.restore('/path/checkpoint*')
resnet_controller
=
orbit
.
Controller
(
strategy
=
strategy
,
trainer
=
runnable
,
...
...
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