tensorflow/models · error · ValueError
{}/{} of Bottleneck weights is transformed.
Error message
{}/{} of Bottleneck weights is transformed. What it means
Error "{}/{} of Bottleneck weights is transformed." thrown in tensorflow/models.
Source
Thrown at official/projects/qat/vision/quantization/layer_transforms.py:96
bottleneck_layer = match_layer.layer
bottleneck_config = bottleneck_layer['config']
bottleneck_names_and_weights = list(match_layer.names_and_weights)
quantized_layer = self._quantized_layer_class(**bottleneck_config)
dummy_input_shape = self._create_dummy_input_shape(quantized_layer)
quantized_layer.compute_output_shape(dummy_input_shape)
quantized_names_and_weights = zip(
[weight.name for weight in quantized_layer.weights],
quantized_layer.get_weights())
match_idx = 0
names_and_weights = []
for name_and_weight in quantized_names_and_weights:
if not helper.is_quantization_weight_name(name=name_and_weight[0]):
name_and_weight = bottleneck_names_and_weights[match_idx]
match_idx = match_idx + 1
names_and_weights.append(name_and_weight)
if match_idx != len(bottleneck_names_and_weights):
raise ValueError('{}/{} of Bottleneck weights is transformed.'.format(
match_idx, len(bottleneck_names_and_weights)))
quantized_layer_config = tf_utils.serialize_layer(
quantized_layer, use_legacy_format=True
)
quantized_layer_config['name'] = quantized_layer_config['config']['name']
layer_metadata = self._create_layer_metadata(bottleneck_layer['class_name'])
return LayerNode(
quantized_layer_config,
metadata=layer_metadata,
names_and_weights=names_and_weights)
CUSTOM_TRANSFORMS = [
CustomLayerQuantize(
'Vision>BottleneckBlock', quantized_nn_blocks.BottleneckBlockQuantized
),View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/qat/vision/quantization/layer_transforms.py:96 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24).
Data as JSON: /api/errors/180247a3c86ba102.
Report an issue: GitHub.