"vscode:/vscode.git/clone" did not exist on "52e7ab68bca0290a5af34fe6f0b914e05daf733c"
Commit 1b30ae6b authored by Abdullah Rashwan's avatar Abdullah Rashwan Committed by A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 448073191
parent bb7ba3e6
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment