Filters dict by input names.

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

d Dict to filter.
input_names List of input names.

Dict with keys matching input_names.

RuntimeError When the specified input name cannot be found.