tensorflow/models · error · ValueError
Unrecognized `input_type`
Error message
Unrecognized `input_type`
What it means
Sentinel fallback in ExportModule.get_inference_signatures: the signature builder branches on the configured serving input key ('image_tensor', 'tf_example', 'tflite', etc.) and this raise is the else-branch reached when `input_type` matches none of them — i.e. the export config names an input format the module does not know how to expose as a concrete function.
Solutions
- Set input_type to 'image_tensor', 'image_bytes', or 'tf_example'.
- Check the serving input_type config for typos.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at official/vision/serving/export_base.py:221 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24).
Data as JSON: /api/errors/5827afefedc8ce1e.
Report an issue: GitHub.
Appendix: source
Thrown at official/vision/serving/export_base.py:221
)
signatures[def_name] = (
self.inference_from_tf_example.get_concrete_function(
input_signature
)
)
elif key == 'tflite':
input_signature = tf.TensorSpec(
shape=[self._batch_size]
+ self._input_image_size
+ [self._num_channels],
dtype=tf.float32,
name=self._input_name,
)
signatures[def_name] = self.inference_for_tflite.get_concrete_function(
input_signature
)
else:
raise ValueError('Unrecognized `input_type`')
return signatures
View on GitHub (pinned to e006f5f0d5)