RandomApplyTransform¶
- class torchaug.transforms.RandomApplyTransform(p=0.5, batch_inplace=False, num_chunks=1, permute_chunks=False, batch_transform=False)[source]¶
Base class for all randomly applied transforms.
For more details, please see Transforms Tutorial.
- Parameters:
p (
float, optional) – The probability of applying the transform. Default:0.5batch_inplace (
bool, optional) – whether to apply the batch transform in-place. Does not prevent functionals to make copy but can reduce time and memory consumption. Default:Falsenum_chunks (
int, optional) – number of chunks to split the batched input into. Default:1permute_chunks (
bool, optional) – whether to permute the chunks. Default:Falsebatch_transform (
bool, optional) – whether to apply the transform in batch mode. Default:False