tensorflow/models · error · ValueError
The min_level should be >= decoder output level, but {} < {}
Error message
The min_level should be >= decoder output level, but {} < {} What it means
Error "The min_level should be >= decoder output level, but {} < {}" thrown in tensorflow/models.
Source
Thrown at official/projects/pointpillars/modeling/heads.py:76
output_specs: A dict of {level: TensorShape} pairs for the model output.
"""
super(SSDHead, self).__init__(**kwargs)
self._config_dict = {
'num_classes': num_classes,
'num_anchors_per_location': num_anchors_per_location,
'num_params_per_anchor': num_params_per_anchor,
'attribute_heads': attribute_heads,
'min_level': min_level,
'max_level': max_level,
'kernel_regularizer': kernel_regularizer,
}
utils.assert_channels_last()
def build(self, input_specs: Mapping[str, tf.TensorShape]):
self._decoder_output_level = int(min(input_specs.keys()))
if self._config_dict['min_level'] < self._decoder_output_level:
raise ValueError('The min_level should be >= decoder output '
'level, but {} < {}'.format(
self._config_dict['min_level'],
self._decoder_output_level))
# Multi-level convs.
# Set num_filters as the one of decoder's output level.
num_filters = input_specs[str(self._decoder_output_level)].as_list()[-1]
self._convs = {}
for level in range(self._decoder_output_level + 1,
self._config_dict['max_level'] + 1):
self._convs[str(level)] = layers.ConvBlock(
filters=num_filters,
kernel_size=3,
strides=2,
kernel_regularizer=self._config_dict['kernel_regularizer'])
# Detection convs, share weights across multi levels.
self._classifier = tf_keras.layers.Conv2D(View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/pointpillars/modeling/heads.py:76 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/57326c688e06d89d.
Report an issue: GitHub.