tensorflow/models · error · ValueError
Inconsistent decoder type {decoder_type}. Need to be `maskco
Error message
Inconsistent decoder type {decoder_type}. Need to be `maskconver_fpn`. What it means
Error "Inconsistent decoder type {decoder_type}. Need to be `maskconver_fpn`." thrown in tensorflow/models.
Source
Thrown at official/projects/maskconver/modeling/fpn.py:258
"""Builds FPN decoder from a config.
Args:
input_specs: A `dict` of input specifications. A dictionary consists of
{level: TensorShape} from a backbone.
model_config: A OneOfConfig. Model config.
l2_regularizer: A `tf_keras.regularizers.Regularizer` instance. Default to
None.
Returns:
A `tf_keras.Model` instance of the MaskConverFPN decoder.
Raises:
ValueError: If the model_config.decoder.type is not `maskconver_fpn`.
"""
decoder_type = model_config.decoder.type
decoder_cfg = model_config.decoder.get()
if decoder_type != 'maskconver_fpn':
raise ValueError(f'Inconsistent decoder type {decoder_type}. '
'Need to be `maskconver_fpn`.')
norm_activation_config = model_config.norm_activation
return MaskConverFPN(
input_specs=input_specs,
min_level=model_config.min_level,
max_level=model_config.max_level,
num_filters=decoder_cfg.num_filters,
fusion_type=decoder_cfg.fusion_type,
use_separable_conv=decoder_cfg.use_separable_conv,
use_keras_layer=decoder_cfg.use_keras_layer,
activation=norm_activation_config.activation,
use_sync_bn=norm_activation_config.use_sync_bn,
norm_momentum=norm_activation_config.norm_momentum,
norm_epsilon=norm_activation_config.norm_epsilon,
use_layer_norm=decoder_cfg.use_layer_norm,
depthwise_kernel_size=decoder_cfg.depthwise_kernel_size,
kernel_regularizer=l2_regularizer)
View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/maskconver/modeling/fpn.py:258 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/fc86d135a8c628e7.
Report an issue: GitHub.