{"record":{"id":"a7f505bd1f684f9b","repo":"tensorflow/models","slug":"unexpected-inputs-to-s-with-length-at-d-a7f505","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/lra/moving_average_gated_attention.py","lineNumber":269,"sourceCode":"\n    Args:\n      inputs: a single tensor or a list of tensors. `input tensor`\n        as the single sequence of embeddings. [`input tensor`,\n        `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    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(\n            \"Unexpected inputs to %s with length at %d\"\n            % (self.__class__, len(inputs))\n        )\n    else:\n      (input_tensor, key_value, attention_mask) = (inputs, None, None)\n\n    if self.prenorm:\n      input_tensor = self.norm(input_tensor)\n      if key_value is not None:\n        key_value = self.norm(key_value)\n\n    ## B*L*D -> L*B*D\n    ## Multi-Dimensional Damped EMA\n    x = tf.transpose(input_tensor, perm=[1, 0, 2])\n    residual = x\n\n    seq_len, bsz, _ = x.shape\n","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/lra/moving_average_gated_attention.py#L251-L287","documentation":"Error \"Unexpected inputs to %s with length at %d\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/lra/moving_average_gated_attention.py:269 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"}