open-mmlab/mmdetection · error · ValueError
There is not post_norm in {name}
Error message
There is not post_norm in {name} What it means
GroundingDinoTransformerDecoder raises ValueError if post_norm_cfg is not None. Like the deformable decoder, Grounding DINO's decoder handles normalization internally and explicitly rejects a configured post-norm.
Source
Thrown at mmdet/models/layers/transformer/grounding_dino_layers.py:266
query_pos=query_pos,
reference_points=reference_points,
spatial_shapes=spatial_shapes,
level_start_index=level_start_index,
key_padding_mask=key_padding_mask)
return output, memory_text
class GroundingDinoTransformerDecoder(DinoTransformerDecoder):
def _init_layers(self) -> None:
"""Initialize decoder layers."""
self.layers = ModuleList([
GroundingDinoTransformerDecoderLayer(**self.layer_cfg)
for _ in range(self.num_layers)
])
self.embed_dims = self.layers[0].embed_dims
if self.post_norm_cfg is not None:
raise ValueError('There is not post_norm in '
f'{self._get_name()}')
self.ref_point_head = MLP(self.embed_dims * 2, self.embed_dims,
self.embed_dims, 2)
self.norm = nn.LayerNorm(self.embed_dims)
View on GitHub (pinned to cfd5d3a985)
Solutions
- Set post_norm_cfg=None in the decoder config
- Audit _base_ config files for a stray post_norm_cfg and override it
Example fix
# before post_norm_cfg=dict(type='LN') # after post_norm_cfg=None
Defensive patterns
Strategy: validation
Validate before calling
assert decoder_cfg.get('post_norm_cfg', None) is None Prevention
- When porting configs between detector families, strip post_norm_cfg for deformable/grounding decoders
When it happens
Trigger: Building GroundingDinoTransformerDecoder with a config inherited from a DETR-style base that sets post_norm_cfg (e.g. dict(type='LN')).
Common situations: Config inheritance from DETR/DAB-DETR baselines; porting configs between detection transformer variants.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Unknown query_scale_type: {}
- There is not post_norm in {name}
- Invalid text mode "{self.text_mode}".
- The type of frame_range must be int or list.
- results does not contain masks.
AI-assisted analysis of open-mmlab/mmdetection@cfd5d3a985 (2026-08-27).
Data as JSON: /api/errors/81ee88bacc6736df.
Report an issue: GitHub.