RandomApply¶
- class mmcv.transforms.RandomApply(transforms: Dict | Callable[[Dict], Dict] | List[Dict | Callable[[Dict], Dict]], prob: float = 0.5)[source]¶
Apply transforms randomly with a given probability.
- Parameters:
Examples
>>> # config >>> pipeline = [ >>> dict(type='RandomApply', >>> transforms=[dict(type='HorizontalFlip')], >>> prob=0.3) >>> ]