tensorflow/models · error · ValueError
`maskrcnn.Parser` only supports `pad = True`.
Error message
`maskrcnn.Parser` only supports `pad = True`.
What it means
Error "`maskrcnn.Parser` only supports `pad = True`." thrown in tensorflow/models.
Source
Thrown at official/vision/configs/maskrcnn.py:55
aug_rand_vflip: bool = False
aug_scale_min: float = 1.0
aug_scale_max: float = 1.0
aug_type: Optional[
common.Augmentation] = None # Choose from AutoAugment and RandAugment.
skip_crowd_during_training: bool = True
max_num_instances: int = 100
rpn_match_threshold: float = 0.7
rpn_unmatched_threshold: float = 0.3
rpn_batch_size_per_im: int = 256
rpn_fg_fraction: float = 0.5
mask_crop_size: int = 112
pad: bool = True # Only support `pad = True`.
keep_aspect_ratio: bool = True # Only support `keep_aspect_ratio = True`.
def __post_init__(self, *args, **kwargs):
"""Validates the configuration."""
if not self.pad:
raise ValueError('`maskrcnn.Parser` only supports `pad = True`.')
if not self.keep_aspect_ratio:
raise ValueError(
'`maskrcnn.Parser` only supports `keep_aspect_ratio = True`.'
)
super().__post_init__(*args, **kwargs)
@dataclasses.dataclass
class DataConfig(cfg.DataConfig):
"""Input config for training."""
input_path: Union[Sequence[str], str, hyperparams.Config] = ''
weights: Optional[hyperparams.Config] = None
global_batch_size: int = 0
is_training: bool = False
dtype: str = 'bfloat16'
decoder: common.DataDecoder = dataclasses.field(
default_factory=common.DataDecoder
)View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/vision/configs/maskrcnn.py:55 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/ddfc7530e4a1ad8e.
Report an issue: GitHub.