{"record":{"id":"7f878450031928d9","repo":"tensorflow/models","slug":"the-type-of-input-shape-argument-is-not-supported-7f8784","errorCode":null,"errorMessage":"The type of input shape argument is not supported, got: %s","messagePattern":"The type of input shape argument is not supported, got: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/nlp/modeling/layers/rezero_transformer.py","lineNumber":143,"sourceCode":"    self._sigmoid_attn_bias = sigmoid_attn_bias\n    if self._linformer_dim is not None or self._use_sigmoid_attn:\n      raise ValueError(\n          \"Linformer and Sigmoid attention are not supported in ReZero\"\n          \" Transformer.\"\n      )\n    if self._num_kv_heads is not None and self._src_block_size is not None:\n      raise ValueError(\n          \"Block sparse attention does not support Multi-query attention.\"\n          \" Specify only one of them.\"\n      )\n\n  def build(self, input_shape):\n    if isinstance(input_shape, tf.TensorShape):\n      input_tensor_shape = input_shape\n    elif isinstance(input_shape, (list, tuple)):\n      input_tensor_shape = tf.TensorShape(input_shape[0])\n    else:\n      raise ValueError(\n          \"The type of input shape argument is not supported, got: %s\"\n          % type(input_shape)\n      )\n\n    if len(input_tensor_shape.as_list()) != 3:\n      raise ValueError(\n          \"TransformerLayer expects a three-dimensional input of \"\n          \"shape [batch, sequence, width].\"\n      )\n    batch_size, sequence_length, hidden_size = input_tensor_shape\n\n    if len(input_shape) == 2:\n      mask_tensor_shape = tf.TensorShape(input_shape[1])\n      expected_mask_tensor_shape = tf.TensorShape(\n          [batch_size, sequence_length, sequence_length]\n      )\n      if not expected_mask_tensor_shape.is_compatible_with(mask_tensor_shape):\n        raise ValueError(","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/nlp/modeling/layers/rezero_transformer.py#L125-L161","documentation":"Error \"The type of input shape argument is not supported, got: %s\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/nlp/modeling/layers/rezero_transformer.py:143 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"}