tensorflow/models · error · ValueError
Unexpected inputs type to {self.__class__}.
Error message
Unexpected inputs type to {self.__class__}. What it means
Error "Unexpected inputs type to {self.__class__}." thrown in tensorflow/models.
Source
Thrown at official/projects/perceiver/modeling/networks/positional_decoder.py:114
"""Return decoded output of latent vector.
Uses the positional encoding as query for the decoder and uses the
`latent_output` as key-value for the decoder.
Args:
inputs:
A `Dict[Text, tf_keras.Input]` with `latent_output` and
`input_mask`. The shape of `latent_output` is shape
`(z_index_dim, d_latents)` with dtype `tf.float32` and `input_mask` is
shape `(None)` with dtype `tf.int32`.
training:
Flag to indicate training status. Default is `None`. It is passed to
the decoder as is.
Returns:
`Dict[Text, tf.Tensor]` decoded `sequence_output` of a latent vector.
"""
if not isinstance(inputs, dict):
raise ValueError(f'Unexpected inputs type to {self.__class__}.')
latent_output = inputs['latent_output']
query_mask = inputs.get('input_mask')
decoder_query = self._output_pos_enc(tf.ones(
(tf.shape(latent_output)[0], self._output_index_dim, self._d_model),
dtype=latent_output.dtype))
z = latent_output
sequence_output = self._decoder(
[decoder_query, z],
query_mask=query_mask,
training=training)
return dict(sequence_output=sequence_output)
View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/perceiver/modeling/networks/positional_decoder.py:114 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/ef97433275434c60.
Report an issue: GitHub.