{"record":{"id":"895664fd17009549","repo":"tensorflow/models","slug":"unexpected-inputs-type-to-self-class-895664","errorCode":null,"errorMessage":"Unexpected inputs type to {self.__class__}.","messagePattern":"Unexpected inputs type to (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/perceiver/modeling/models/classifier.py","lineNumber":167,"sourceCode":"    self.inputs = inputs\n    self._cls_head = cls_head\n    self._name = name\n    self.classifier = classifier\n\n  def call(self, inputs):  # pytype: disable=signature-mismatch  # overriding-parameter-count-checks\n    \"\"\"Return perceiver classifier model output tensors in a dict.\n\n    Accepts inputs as dictionary of tensors.\n    Args:\n      inputs:\n        A `Dict[str, tf_keras.Input]` with `input_word_ids`, `input_mask`, and\n        `input_type_ids`. The shapes are all `(None)` with dtype `tf.int32`.\n\n    Returns:\n      `tf.Tensor` classification output.\n    \"\"\"\n    if not isinstance(inputs, dict):\n      raise ValueError(f'Unexpected inputs type to {self.__class__}.')\n\n    word_ids = inputs['input_word_ids']\n    input_type_ids = inputs.get('input_type_ids')\n    input_mask = inputs.get('input_mask')\n\n    encoder_inputs = {\n        'input_word_ids': word_ids,\n        'input_mask': input_mask,\n        'input_type_ids': input_type_ids,\n    }\n    encoder_outputs = self._network(encoder_inputs)\n\n    if 'sequence_output' not in encoder_outputs:\n      if 'latent_output' in encoder_outputs:\n        z = encoder_outputs['latent_output']\n        decoder_inputs = {'latent_output': z, 'input_mask': input_mask}\n        decoder_output = self._decoder(decoder_inputs)  # pyrefly: ignore[not-callable]\n","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/perceiver/modeling/models/classifier.py#L149-L185","documentation":"Error \"Unexpected inputs type to {self.__class__}.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/perceiver/modeling/models/classifier.py:167 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"}