Join the SIG TFX-Addons community and help make TFX even better!


Applies a SavedModel to some Tensors.

Applies a SavedModel to inputs. The SavedModel is specified with model_dir, tags and signature_name. Note that the SavedModel will be converted to an all-constants graph.

model_dir A path containing a SavedModel.
inputs A dict whose keys are the names from the input signature and whose values are Tensors. If there is only one input in the model's input signature then inputs can be a single Tensor.
tags The tags specifying which metagraph to load from the SavedModel.
signature_name Specify signature of the loaded model. The default value None can be used if there is only one signature in the MetaGraphDef.
output_keys_in_signature A list of strings which should be a subset of the outputs in the signature of the SavedModel. The returned Tensors will correspond to specified output Tensors, in the same order. The default value None can be used if there is only one output from signature.

A Tensor or list of Tensors representing the application of the SavedModel.

ValueError if inputs is invalid type, or signature_name is None but the SavedModel contains multiple signature, or inputs do not match the signature inputs, or output_keys_in_signature is not a subset of the signature outputs.