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/nlp/quantization/schemes.py:122
else:
dummy_input_shape = [1, 1]
quantized_layer(np.zeros(shape=dummy_input_shape, dtype=np.int32),
np.zeros(shape=dummy_input_shape, dtype=np.int32),
training=False)
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 self._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 = {
'quantize_config':
configs.NoQuantizeConfig()}
return LayerNode(
quantized_layer_config,
metadata=layer_metadata,
names_and_weights=names_and_weights)
class MobileBertTransformerQuantize(TransformerEncoderBlockQuantize):
def __init__(self):View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/qat/nlp/quantization/schemes.py:122 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/ebf6748131189ae7.
Report an issue: GitHub.