Flip around a random axis (Albumentations Flip).
Samples code ∈ {0 (vertical), 1 (horizontal), -1 (both)}.
Parameters
pfloat= 1.0Probability of applying the transform; otherwise the input
passes through unchanged.
Examples
>>> import lucid, lucid.utils.transforms as T
>>> tf = T.Flip(p=1.0)
>>> tuple(tf(T.Image(lucid.rand(3, 32, 32))).data.shape)
(3, 32, 32)