{"record":{"id":"ebf6748131189ae7","repo":"tensorflow/models","slug":"of-bottleneck-weights-is-transformed","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/nlp/quantization/schemes.py","lineNumber":122,"sourceCode":"    else:\n      dummy_input_shape = [1, 1]\n      quantized_layer(np.zeros(shape=dummy_input_shape, dtype=np.int32),\n                      np.zeros(shape=dummy_input_shape, dtype=np.int32),\n                      training=False)\n\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 = tf_utils.serialize_layer(\n        quantized_layer, use_legacy_format=True\n    )\n    quantized_layer_config['name'] = quantized_layer_config['config']['name']\n    layer_metadata = {\n        'quantize_config':\n            configs.NoQuantizeConfig()}\n\n    return LayerNode(\n        quantized_layer_config,\n        metadata=layer_metadata,\n        names_and_weights=names_and_weights)\n\n\nclass MobileBertTransformerQuantize(TransformerEncoderBlockQuantize):\n\n  def __init__(self):","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/qat/nlp/quantization/schemes.py#L104-L140","documentation":"Error \"{}/{} of Bottleneck weights is transformed.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/qat/nlp/quantization/schemes.py:122 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"}