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
e7f203e9
Commit
e7f203e9
authored
May 11, 2022
by
Abdullah Rashwan
Committed by
A. Unique TensorFlower
May 11, 2022
Browse files
Internal change
PiperOrigin-RevId: 448073191
parent
69e72416
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
official/vision/serving/export_saved_model_lib_v2.py
official/vision/serving/export_saved_model_lib_v2.py
+6
-2
No files found.
official/vision/serving/export_saved_model_lib_v2.py
View file @
e7f203e9
...
...
@@ -15,7 +15,7 @@
r
"""Vision models export utility function for serving/inference."""
import
os
from
typing
import
Optional
,
List
from
typing
import
Optional
,
List
,
Union
,
Text
,
Dict
import
tensorflow
as
tf
...
...
@@ -36,6 +36,7 @@ def export(
export_module
:
Optional
[
export_base
.
ExportModule
]
=
None
,
export_checkpoint_subdir
:
Optional
[
str
]
=
None
,
export_saved_model_subdir
:
Optional
[
str
]
=
None
,
function_keys
:
Optional
[
Union
[
List
[
Text
],
Dict
[
Text
,
Text
]]]
=
None
,
save_options
:
Optional
[
tf
.
saved_model
.
SaveOptions
]
=
None
):
"""Exports the model specified in the exp config.
...
...
@@ -57,6 +58,9 @@ def export(
to store checkpoint.
export_saved_model_subdir: Optional subdirectory under export_dir
to store saved model.
function_keys: a list of string keys to retrieve pre-defined serving
signatures. The signaute keys will be set with defaults. If a dictionary
is provided, the values will be used as signature keys.
save_options: `SaveOptions` for `tf.saved_model.save`.
"""
...
...
@@ -81,7 +85,7 @@ def export(
export_base
.
export
(
export_module
,
function_keys
=
[
input_type
],
function_keys
=
function_keys
if
function_keys
else
[
input_type
],
export_savedmodel_dir
=
output_saved_model_directory
,
checkpoint_path
=
checkpoint_path
,
timestamped
=
False
,
...
...
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