{"record":{"id":"069c78273ddf3001","repo":"tensorflow/models","slug":"unexpected-inputs-type-s-to-s-069c78","errorCode":null,"errorMessage":"Unexpected inputs type (%s) to %s.","messagePattern":"Unexpected inputs type \\((.+?)\\) to (.+?)\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/nlp/modeling/networks/sparse_mixer.py","lineNumber":312,"sourceCode":"          input_mask=tf_keras.Input(\n              shape=(max_sequence_length,), dtype=tf.int32),\n          input_type_ids=tf_keras.Input(\n              shape=(max_sequence_length,), dtype=tf.int32))\n    self._max_sequence_length = max_sequence_length\n\n  def call(self, inputs):\n    word_embeddings = None\n    if isinstance(inputs, dict):\n      word_ids = inputs.get('input_word_ids')\n      mask = inputs.get('input_mask')\n      type_ids = inputs.get('input_type_ids')\n      word_embeddings = inputs.get('input_word_embeddings', None)\n\n      dense_inputs = inputs.get('dense_inputs', None)\n      dense_mask = inputs.get('dense_mask', None)\n      dense_type_ids = inputs.get('dense_type_ids', None)\n    else:\n      raise ValueError('Unexpected inputs type (%s) to %s.' %\n                       (type(inputs), self.__class__))\n\n    if word_embeddings is None:\n      word_embeddings = self._embedding_layer(word_ids)\n\n    if dense_inputs is not None:\n      # Concat the dense embeddings at sequence end.\n      word_embeddings = tf.concat([word_embeddings, dense_inputs], axis=1)\n      type_ids = tf.concat([type_ids, dense_type_ids], axis=1)\n      mask = tf.concat([mask, dense_mask], axis=1)\n\n    # SparseMixer: Sequence length must be the same as `max_sequence_length`.\n    word_embeddings = tf.ensure_shape(word_embeddings,\n                                      [None, self._max_sequence_length, None])\n\n    # Absolute position embeddings.\n    position_embeddings = self._position_embedding_layer(word_embeddings)\n    type_embeddings = self._type_embedding_layer(type_ids)","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/nlp/modeling/networks/sparse_mixer.py#L294-L330","documentation":"Error \"Unexpected inputs type (%s) to %s.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/nlp/modeling/networks/sparse_mixer.py:312 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}