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
599c26f5
Commit
599c26f5
authored
Mar 21, 2022
by
A. Unique TensorFlower
Browse files
Add checkpoint arg to export_inference_graph
PiperOrigin-RevId: 436288626
parent
470986b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
official/vision/serving/export_saved_model_lib.py
official/vision/serving/export_saved_model_lib.py
+5
-1
No files found.
official/vision/serving/export_saved_model_lib.py
View file @
599c26f5
...
@@ -43,7 +43,8 @@ def export_inference_graph(
...
@@ -43,7 +43,8 @@ def export_inference_graph(
export_checkpoint_subdir
:
Optional
[
str
]
=
None
,
export_checkpoint_subdir
:
Optional
[
str
]
=
None
,
export_saved_model_subdir
:
Optional
[
str
]
=
None
,
export_saved_model_subdir
:
Optional
[
str
]
=
None
,
save_options
:
Optional
[
tf
.
saved_model
.
SaveOptions
]
=
None
,
save_options
:
Optional
[
tf
.
saved_model
.
SaveOptions
]
=
None
,
log_model_flops_and_params
:
bool
=
False
):
log_model_flops_and_params
:
bool
=
False
,
checkpoint
:
Optional
[
tf
.
train
.
Checkpoint
]
=
None
):
"""Exports inference graph for the model specified in the exp config.
"""Exports inference graph for the model specified in the exp config.
Saved model is stored at export_dir/saved_model, checkpoint is saved
Saved model is stored at export_dir/saved_model, checkpoint is saved
...
@@ -67,6 +68,8 @@ def export_inference_graph(
...
@@ -67,6 +68,8 @@ def export_inference_graph(
save_options: `SaveOptions` for `tf.saved_model.save`.
save_options: `SaveOptions` for `tf.saved_model.save`.
log_model_flops_and_params: If True, writes model FLOPs to model_flops.txt
log_model_flops_and_params: If True, writes model FLOPs to model_flops.txt
and model parameters to model_params.txt.
and model parameters to model_params.txt.
checkpoint: An optional tf.train.Checkpoint. If provided, the export module
will use it to read the weights.
"""
"""
if
export_checkpoint_subdir
:
if
export_checkpoint_subdir
:
...
@@ -123,6 +126,7 @@ def export_inference_graph(
...
@@ -123,6 +126,7 @@ def export_inference_graph(
export_module
,
export_module
,
function_keys
=
[
input_type
],
function_keys
=
[
input_type
],
export_savedmodel_dir
=
output_saved_model_directory
,
export_savedmodel_dir
=
output_saved_model_directory
,
checkpoint
=
checkpoint
,
checkpoint_path
=
checkpoint_path
,
checkpoint_path
=
checkpoint_path
,
timestamped
=
False
,
timestamped
=
False
,
save_options
=
save_options
)
save_options
=
save_options
)
...
...
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