{"record":{"id":"8882add43e1517b5","repo":"tensorflow/models","slug":"variable-name-simple-name-is-not-supported-on-cu","errorCode":null,"errorMessage":"Variable name {simple_name} is not supported on CustomLayerQuantize({self._original_layer_pattern}) transform.","messagePattern":"Variable name (.+?) is not supported on CustomLayerQuantize\\((.+?)\\) transform\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/qat/vision/n_bit/schemes.py","lineNumber":67,"sourceCode":"               num_bits_weight: int = 8,\n               num_bits_activation: int = 8):\n    super().__init__()\n    self._original_layer_pattern = original_layer_pattern\n    self._quantized_layer_class = quantized_layer_class\n    self._num_bits_weight = num_bits_weight\n    self._num_bits_activation = num_bits_activation\n\n  def pattern(self) -> _LayerPattern:\n    \"\"\"See base class.\"\"\"\n    return _LayerPattern(self._original_layer_pattern)\n\n  def _is_quantization_weight_name(self, name):\n    simple_name = name.split('/')[-1].split(':')[0]\n    if simple_name in _QUANTIZATION_WEIGHT_NAMES:\n      return True\n    if simple_name in _ORIGINAL_WEIGHT_NAME:\n      return False\n    raise ValueError(f'Variable name {simple_name} is not supported on '\n                     'CustomLayerQuantize({self._original_layer_pattern}) '\n                     'transform.')\n\n  def replacement(self, match_layer: _LayerNode) -> _LayerNode:\n    \"\"\"See base class.\"\"\"\n    bottleneck_layer = match_layer.layer\n    bottleneck_config = bottleneck_layer['config']\n    bottleneck_config['num_bits_weight'] = self._num_bits_weight\n    bottleneck_config['num_bits_activation'] = self._num_bits_activation\n    bottleneck_names_and_weights = list(match_layer.names_and_weights)\n    quantized_layer = self._quantized_layer_class(\n        **bottleneck_config)\n    dummy_input_shape = [1, 1, 1, 1]\n    quantized_layer.compute_output_shape(dummy_input_shape)\n    quantized_names_and_weights = zip(\n        [weight.name for weight in quantized_layer.weights],\n        quantized_layer.get_weights())\n    match_idx = 0","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/qat/vision/n_bit/schemes.py#L49-L85","documentation":"Error \"Variable name {simple_name} is not supported on CustomLayerQuantize({self._original_layer_pattern}) transform.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/qat/vision/n_bit/schemes.py:67 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"}