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
87fd3922
Commit
87fd3922
authored
May 14, 2021
by
Rajagopal Ananthanarayanan
Committed by
A. Unique TensorFlower
May 14, 2021
Browse files
Internal change
PiperOrigin-RevId: 373818227
parent
4a09d217
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
official/vision/beta/serving/export_saved_model_lib.py
official/vision/beta/serving/export_saved_model_lib.py
+5
-2
No files found.
official/vision/beta/serving/export_saved_model_lib.py
View file @
87fd3922
...
@@ -39,7 +39,8 @@ def export_inference_graph(
...
@@ -39,7 +39,8 @@ def export_inference_graph(
num_channels
:
Optional
[
int
]
=
3
,
num_channels
:
Optional
[
int
]
=
3
,
export_module
:
Optional
[
export_base
.
ExportModule
]
=
None
,
export_module
:
Optional
[
export_base
.
ExportModule
]
=
None
,
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
):
"""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
...
@@ -60,6 +61,7 @@ def export_inference_graph(
...
@@ -60,6 +61,7 @@ def export_inference_graph(
to store checkpoint.
to store checkpoint.
export_saved_model_subdir: Optional subdirectory under export_dir
export_saved_model_subdir: Optional subdirectory under export_dir
to store saved model.
to store saved model.
save_options: `SaveOptions` for `tf.saved_model.save`.
"""
"""
if
export_checkpoint_subdir
:
if
export_checkpoint_subdir
:
...
@@ -106,7 +108,8 @@ def export_inference_graph(
...
@@ -106,7 +108,8 @@ def export_inference_graph(
function_keys
=
[
input_type
],
function_keys
=
[
input_type
],
export_savedmodel_dir
=
output_saved_model_directory
,
export_savedmodel_dir
=
output_saved_model_directory
,
checkpoint_path
=
checkpoint_path
,
checkpoint_path
=
checkpoint_path
,
timestamped
=
False
)
timestamped
=
False
,
save_options
=
save_options
)
ckpt
=
tf
.
train
.
Checkpoint
(
model
=
export_module
.
model
)
ckpt
=
tf
.
train
.
Checkpoint
(
model
=
export_module
.
model
)
ckpt
.
save
(
os
.
path
.
join
(
output_checkpoint_directory
,
'ckpt'
))
ckpt
.
save
(
os
.
path
.
join
(
output_checkpoint_directory
,
'ckpt'
))
...
...
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