{"record":{"id":"6f97384abbf738f9","repo":"tensorflow/models","slug":"at-least-one-of-inputs-and-dense-inputs-must-not-b","errorCode":null,"errorMessage":"At least one of inputs and dense_inputs must not be None.","messagePattern":"At least one of inputs and dense_inputs must not be None\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/nlp/modeling/models/t5.py","lineNumber":1167,"sourceCode":"      dense_inputs: dense input data. Concat after the embedding if word ids are\n        provided.\n      training: whether it is training pass, affecting dropouts.\n\n    Returns:\n      output of a transformer encoder.\n    \"\"\"\n    # Casts inputs to the dtype.\n    if encoder_mask is not None:\n      encoder_mask = tf.cast(encoder_mask, self.compute_dtype)\n    cfg = self.config\n    inputs_array = []\n    if inputs is not None:\n      inputs_array.append(\n          self.input_embed(inputs, one_hot=cfg.one_hot_embedding))  # pyrefly: ignore[not-callable]\n    if dense_inputs is not None:\n      inputs_array.append(dense_inputs)\n    if not inputs_array:\n      raise ValueError(\"At least one of inputs and dense_inputs must not be \"\n                       \"None.\")\n    x = tf.concat(inputs_array, axis=1)\n    tensor_shape = tf_utils.get_shape_list(x)\n    tensor_shape[-2] = 1\n    x = self.input_dropout(x, noise_shape=tensor_shape, training=training)\n    if inputs is not None:\n      input_length = tf_utils.get_shape_list(inputs)[1]\n    else:\n      input_length = 0\n\n    attention_outputs = []\n    for i in range(cfg.num_layers):\n      position_bias = self.get_relpos_bias(input_length, dense_inputs, i)\n      x = self.encoder_layers[i](\n          x,\n          attention_mask=encoder_mask,\n          position_bias=position_bias,\n          training=training)","sourceCodeStart":1149,"sourceCodeEnd":1185,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/nlp/modeling/models/t5.py#L1149-L1185","documentation":"Error \"At least one of inputs and dense_inputs must not be None.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/nlp/modeling/models/t5.py:1167 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"}