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)Used by 1
Constructors
1Initialise the driver; the executable itself is lazy.
Parameters
modelSee
fused_step for semantics.loss_fnSee
fused_step for semantics.optimizerSee
fused_step for semantics.grad_scalerGradScalerSee
fused_step. When provided and enabled, the
trace records the scale → unscale → found_inf → conditional
update plumbing entirely inside the executable so the
user-facing step is identical to a no-scaler call.Raises
ValueErrorIf
optimizer exposes no trainable parameters (every
param_group is empty).