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
30f93777
You need to sign in or sign up before continuing.
Commit
30f93777
authored
Mar 11, 2021
by
Ronny Votel
Committed by
TF Object Detection Team
Mar 11, 2021
Browse files
Adding option to save the pipeline config file during evaluation.
PiperOrigin-RevId: 362353183
parent
af2567bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
research/object_detection/model_lib_v2.py
research/object_detection/model_lib_v2.py
+8
-2
No files found.
research/object_detection/model_lib_v2.py
View file @
30f93777
...
...
@@ -506,6 +506,8 @@ def train_loop(
# Write the as-run pipeline config to disk.
if
save_final_config
:
tf
.
logging
.
info
(
'Saving pipeline config file to directory {}'
.
format
(
model_dir
))
pipeline_config_final
=
create_pipeline_proto_from_configs
(
configs
)
config_util
.
save_pipeline_config
(
pipeline_config_final
,
model_dir
)
...
...
@@ -991,6 +993,7 @@ def eval_continuously(
wait_interval
=
180
,
timeout
=
3600
,
eval_index
=
0
,
save_final_config
=
False
,
**
kwargs
):
"""Run continuous evaluation of a detection model eagerly.
...
...
@@ -1022,7 +1025,8 @@ def eval_continuously(
will terminate if no new checkpoints are found after these many seconds.
eval_index: int, If given, only evaluate the dataset at the given
index. By default, evaluates dataset at 0'th index.
save_final_config: Whether to save the pipeline config file to the model
directory.
**kwargs: Additional keyword arguments for configuration override.
"""
get_configs_from_pipeline_file
=
MODEL_BUILD_UTIL_MAP
[
...
...
@@ -1046,7 +1050,9 @@ def eval_continuously(
'Forced number of epochs for all eval validations to be 1.'
)
configs
=
merge_external_params_with_configs
(
configs
,
None
,
kwargs_dict
=
kwargs
)
if
model_dir
:
if
model_dir
and
save_final_config
:
tf
.
logging
.
info
(
'Saving pipeline config file to directory {}'
.
format
(
model_dir
))
pipeline_config_final
=
create_pipeline_proto_from_configs
(
configs
)
config_util
.
save_pipeline_config
(
pipeline_config_final
,
model_dir
)
...
...
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