{"record":{"id":"bc5008610da58e8c","repo":"tensorflow/models","slug":"the-type-of-input-shape-argument-is-not-supported-bc5008","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/projects/lra/linformer_encoder_block.py","lineNumber":184,"sourceCode":"    else:\n      self._attention_initializer = tf_utils.clone_initializer(\n          self._kernel_initializer\n      )\n    self._attention_axes = attention_axes\n\n    if self._diff_q_kv_att_layer_norm and not self._norm_first:\n      raise ValueError(\n          \"Setting `diff_q_and_kv_attention_layer_norm` to True\"\n          \"when `norm_first` is False is invalid.\"\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    einsum_equation = \"abc,cd->abd\"\n    if len(input_tensor_shape.as_list()) > 3:\n      einsum_equation = \"...bc,cd->...bd\"\n    hidden_size = input_tensor_shape[-1]\n    if hidden_size % self._num_heads != 0:\n      logging.warning(\n          (\n              \"The input size (%d) is not a multiple of the number of attention\"\n              \" heads (%d)\"\n          ),\n          hidden_size,\n          self._num_heads,\n      )\n    if self._key_dim is None:\n      self._key_dim = int(hidden_size // self._num_heads)","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/lra/linformer_encoder_block.py#L166-L202","documentation":"Error \"The type of input shape argument is not supported, got: %s\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/lra/linformer_encoder_block.py:184 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"}