tfma.model_util.filter_tensors_by_input_names

Filter tensors by input names.

In case we don't find the specified input name in the tensors and there exists only one input name, we assume we are feeding serialized examples to the model and return None.

tensors Dict of tensors.
input_names List of input names.

Filtered tensors.

RuntimeError When the specified input tensor cannot be found.