{"record":{"id":"5e1692d9c3eeed97","repo":"tensorflow/models","slug":"of-bottleneck-weights-is-transformed-5e1692","errorCode":null,"errorMessage":"{}/{} of Bottleneck weights is transformed.","messagePattern":"(.+?)/(.+?) of Bottleneck weights is transformed\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/qat/vision/n_bit/schemes.py","lineNumber":94,"sourceCode":"    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\n    names_and_weights = []\n    for name_and_weight in quantized_names_and_weights:\n      if not self._is_quantization_weight_name(name=name_and_weight[0]):\n        name_and_weight = bottleneck_names_and_weights[match_idx]\n        match_idx = match_idx + 1\n      names_and_weights.append(name_and_weight)\n\n    if match_idx != len(bottleneck_names_and_weights):\n      raise ValueError('{}/{} of Bottleneck weights is transformed.'.format(\n          match_idx, len(bottleneck_names_and_weights)))\n    quantized_layer_config = keras.layers.serialize(quantized_layer)\n    quantized_layer_config['name'] = quantized_layer_config['config']['name']\n    layer_metadata = {\n        'quantize_config':\n            configs.DefaultNBitOutputQuantizeConfig(\n                num_bits_weight=self._num_bits_weight,\n                num_bits_activation=self._num_bits_activation)}\n\n    return _LayerNode(\n        quantized_layer_config,\n        metadata=layer_metadata,\n        names_and_weights=names_and_weights)\n\n\nclass QuantizeLayoutTransform(\n    tfmot.quantization.keras.QuantizeLayoutTransform):\n  \"\"\"Default model transformations.\"\"\"","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/qat/vision/n_bit/schemes.py#L76-L112","documentation":"Error \"{}/{} of Bottleneck weights is transformed.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/qat/vision/n_bit/schemes.py:94 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"}