Add a command line option to the CLI utility to select the requested outputs for adding to the generated signature
Details
API
The new arguments for the API functions should be optional.
The functions should verify that the requested outputs exist in the model and are indeed output nodes.
The optional parameter should be named signature_def_map and contain a mapping from a signature key (of type string) to dict containing the keysinputs andoutputs, which map to an enumerable of strings (output names) and an
optional method_name:
An empty key (None or '') should map to the default signature key.
Duplicate keys are considered to be an invalid argument and raise a ValueError.
CLI
The signature name can be selected using the command line option --signature_key, which is a singular non-empty string argument. If omitted, the default signature key is applied.
The outputs for the singular signature can be selected using the command line option --outputs, which is a comma-separated list of output names. The option can be specified multiple times. Duplicate names are only considered once.
The method name can be set using the command line option --method_name
--signature_key, --outputs, and --method_name are only valid in conjunction with the output format tf_saved_model
if any of the three new options is specified along with an output format other than tf_saved_model, a warning message is printed
Description
Scope
Extend the API so that graph-model-to-saved-model and graph-models-to-saved-model allow specifying outputs and signature keys
Add a command line option to the CLI utility to select the requested outputs for adding to the generated signature
Details
API
The optional parameter should be named
signature_def_map
and contain a mapping from a signature key (of type string) todict
containing the keysinputs andoutputs, which map to an enumerable of strings (output names) and an optional method_name:None
or '') should map to the default signature key.ValueError
.CLI
--signature_key
, which is a singular non-empty string argument. If omitted, the default signature key is applied.--outputs
, which is a comma-separated list of output names.The option can be specified multiple times.Duplicate names are only considered once.--method_name
--signature_key
,--outputs
, and--method_name
are only valid in conjunction with the output formattf_saved_model
tf_saved_model
, a warning message is printed