{"record":{"id":"610b34a3bc2b1f38","repo":"tensorflow/models","slug":"inputs-must-be-a-sequence","errorCode":null,"errorMessage":"`inputs` must be a sequence.","messagePattern":"`inputs` must be a sequence\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/perceiver/modeling/layers/decoder.py","lineNumber":125,"sourceCode":"\n    Args:\n      inputs:\n        Expect inputs to be a tuple of perceiver's decoder query tensor and\n        latent tensor (z). For the cross attention block, `z` is the key-value\n        tensor and decoder query is the query tensor.\n        Latent tensor comes from the self-attention processing blocks and\n        decoder query comes from users to query for the desired output.\n      training:\n        Flag to indicate training status.\n      query_mask:\n        mask used to create the attention mask for the query tensor in the\n        cross attention block.\n\n    Returns:\n      `tf.Tensor` decoded output of latent vector via the query.\n    \"\"\"\n    if not isinstance(inputs, collections.abc.Sequence):\n      raise ValueError(\"`inputs` must be a sequence.\")\n    if len(inputs) != 2:\n      raise ValueError(\"`inputs` must have two elements.\")\n\n    query, z = inputs\n    # Cross-attention decoding.\n    # key, value: B x N x K; query: B x M x K\n    # Attention maps -> B x N x M\n    # Output -> B x M x K\n    # Construct cross attention and linear layer lazily, in case we don't need\n    # them.\n    if query_mask is None:\n      attention_mask = None\n    else:\n      attention_mask = utils.make_cross_attention_mask(\n          query_mask=query_mask,\n          kv_mask=tf.ones(tf.shape(z)[:2], dtype=tf.int32))\n\n    output = self._decoding_cross_attn(","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/perceiver/modeling/layers/decoder.py#L107-L143","documentation":"Error \"`inputs` must be a sequence.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/perceiver/modeling/layers/decoder.py:125 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"}