{"record":{"id":"180247a3c86ba102","repo":"tensorflow/models","slug":"of-bottleneck-weights-is-transformed-180247","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/quantization/layer_transforms.py","lineNumber":96,"sourceCode":"    bottleneck_layer = match_layer.layer\n    bottleneck_config = bottleneck_layer['config']\n    bottleneck_names_and_weights = list(match_layer.names_and_weights)\n    quantized_layer = self._quantized_layer_class(**bottleneck_config)\n    dummy_input_shape = self._create_dummy_input_shape(quantized_layer)\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 helper.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 = tf_utils.serialize_layer(\n        quantized_layer, use_legacy_format=True\n    )\n    quantized_layer_config['name'] = quantized_layer_config['config']['name']\n\n    layer_metadata = self._create_layer_metadata(bottleneck_layer['class_name'])\n\n    return LayerNode(\n        quantized_layer_config,\n        metadata=layer_metadata,\n        names_and_weights=names_and_weights)\n\n\nCUSTOM_TRANSFORMS = [\n    CustomLayerQuantize(\n        'Vision>BottleneckBlock', quantized_nn_blocks.BottleneckBlockQuantized\n    ),","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/qat/vision/quantization/layer_transforms.py#L78-L114","documentation":"Error \"{}/{} of Bottleneck weights is transformed.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/qat/vision/quantization/layer_transforms.py:96 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"}