{"record":{"id":"46c61111f48ca974","repo":"tensorflow/models","slug":"unexpected-inputs-to-s-with-length-at-d-46c611","errorCode":null,"errorMessage":"Unexpected inputs to %s with length at %d","messagePattern":"Unexpected inputs to (.+?) with length at (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/roformer/roformer_encoder_block.py","lineNumber":263,"sourceCode":"\n    Args:\n      inputs: a single tensor or a list of tensors. `input tensor` as the single\n        sequence of embeddings. [`input tensor`, `attention mask`] to have the\n        additional attention mask. [`query tensor`, `key value tensor`,\n        `attention mask`] to have separate input streams for the query, and\n        key/value to the multi-head attention.\n\n    Returns:\n      An output tensor with the same dimensions as input/query tensor.\n    \"\"\"\n    if isinstance(inputs, (list, tuple)):\n      if len(inputs) == 2:\n        input_tensor, attention_mask = inputs\n        key_value = None\n      elif len(inputs) == 3:\n        input_tensor, key_value, attention_mask = inputs\n      else:\n        raise ValueError(\"Unexpected inputs to %s with length at %d\" %\n                         (self.__class__, len(inputs)))\n    else:\n      input_tensor, key_value, attention_mask = (inputs, None, None)\n\n    if self._output_range:\n      if self._norm_first:\n        source_tensor = input_tensor[:, 0:self._output_range, :]\n        input_tensor = self._attention_layer_norm(input_tensor)\n        if key_value is not None:\n          key_value = self._attention_layer_norm(key_value)\n      target_tensor = input_tensor[:, 0:self._output_range, :]\n      if attention_mask is not None:\n        attention_mask = attention_mask[:, 0:self._output_range, :]\n    else:\n      if self._norm_first:\n        source_tensor = input_tensor\n        input_tensor = self._attention_layer_norm(input_tensor)\n        if key_value is not None:","sourceCodeStart":245,"sourceCodeEnd":281,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/roformer/roformer_encoder_block.py#L245-L281","documentation":"Error \"Unexpected inputs to %s with length at %d\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/roformer/roformer_encoder_block.py:263 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"}