Transform

Adds more basic transform types to fastai.

source

BatchRandTransform

 BatchRandTransform (p:Numeric=1.0,
                     before_call:Callable[[Tensor|tuple[Tensor,...],int],N
                     one]|None=None, **kwargs)

Randomly selects a subset of batch b to apply transform with per item probability p in before_call

Type Default Details
p Numeric 1.0 Probability of applying Transform to each batch item
before_call Callable[[Tensor | tuple[Tensor, …], int], None] | None None Batch preprocessing function
kwargs