{"record":{"id":"8b90f6397b5dd436","repo":"tensorflow/models","slug":"unexpected-inputs-type-to-s-8b90f6","errorCode":null,"errorMessage":"Unexpected inputs type to %s.","messagePattern":"Unexpected inputs type to (.+?)\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/lra/lra_dual_encoder.py","lineNumber":94,"sourceCode":"\n    self.network = network\n    self.classifier = tfm.nlp.layers.ClassificationHead(\n        inner_dim=0 if use_encoder_pooler else inner_dim,\n        num_classes=num_classes,\n        initializer=initializer,\n        dropout_rate=dropout_rate,\n        name=head_name,\n    )\n\n  def call(self, inputs):\n    if isinstance(inputs, dict):\n      left_word_ids = inputs.get('left_word_ids')\n      left_mask = inputs.get('left_mask')\n\n      right_word_ids = inputs.get('right_word_ids')\n      right_mask = inputs.get('right_mask')\n    else:\n      raise ValueError('Unexpected inputs type to %s.' % self.__class__)\n\n    inputs = [left_word_ids, left_mask, right_word_ids, right_mask]\n\n    left_inputs = [left_word_ids, left_mask]\n    left_outputs = self.network(left_inputs)\n    right_inputs = [right_word_ids, right_mask]\n    right_outputs = self.network(right_inputs)\n\n    if self._use_encoder_pooler:\n      # Because we have a copy of inputs to create this Model object, we can\n      # invoke the Network object with its own input tensors to start the Model.\n      if isinstance(left_outputs, list):\n        left_cls_inputs = left_outputs[1]\n        right_cls_inputs = right_outputs[1]\n      else:\n        left_cls_inputs = left_outputs['pooled_output']\n        right_cls_inputs = right_outputs['pooled_output']\n    else:","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/lra/lra_dual_encoder.py#L76-L112","documentation":"Error \"Unexpected inputs type to %s.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/lra/lra_dual_encoder.py:94 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"}