tensorflow/models · error · ValueError
Unexpected inputs type to %s.
Error message
Unexpected inputs type to %s.
What it means
Error "Unexpected inputs type to %s." thrown in tensorflow/models.
Source
Thrown at official/nlp/modeling/networks/funnel_transformer.py:484
word_ids, mask, type_ids, dense_inputs, dense_mask, dense_type_ids = (
inputs
)
else:
raise ValueError(
'Unexpected inputs to %s with length at %d.'
% (self.__class__, len(inputs))
)
elif isinstance(inputs, dict):
word_ids = inputs.get('input_word_ids')
mask = inputs.get('input_mask')
type_ids = inputs.get('input_type_ids')
word_embeddings = inputs.get('input_word_embeddings', None)
dense_inputs = inputs.get('dense_inputs', None)
dense_mask = inputs.get('dense_mask', None)
dense_type_ids = inputs.get('dense_type_ids', None)
else:
raise ValueError('Unexpected inputs type to %s.' % self.__class__)
if word_embeddings is None:
word_embeddings = self._embedding_layer(word_ids)
if dense_inputs is not None:
# Allow concatenation of the dense embeddings at sequence end if requested
# and `unpool_length`` is set as zero
if self._append_dense_inputs:
if self._unpool_length != 0:
raise ValueError(
'unpool_length is not supported by append_dense_inputs now.'
)
word_embeddings = tf.concat([word_embeddings, dense_inputs], axis=1)
type_ids = tf.concat([type_ids, dense_type_ids], axis=1)
mask = tf.concat([mask, dense_mask], axis=1)
else:
# Concat the dense embeddings at sequence begin so unpool_len can
# control embedding not being pooled.View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/nlp/modeling/networks/funnel_transformer.py:484 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/35565f037edb982f.
Report an issue: GitHub.