Apply exactly one child, sampled by child-p weight (Albumentations OneOf).
On each call (gated by the container's p), draws a single child
via a categorical distribution whose weights are the children's
own p values normalised to sum to 1. The selected child is
then forced to run with its own probability gate bypassed — its
p acts purely as a selection weight, not a per-call
skip-probability. Equal weights ⇒ uniform sampling.
Parameters
transformslist of TransformLikeCandidate children. Each child's
p is used as its
unnormalised selection weight; raw callables get weight 1.pfloat= 0.5Container-level gate — with probability
1 - p the entire
block is skipped and the input passes through unchanged.Examples
>>> import lucid.utils.transforms as T
>>> tf = T.OneOf([
... T.HorizontalFlip(p=1.0),
... T.VerticalFlip(p=1.0),
... ], p=1.0)