BatchMixUp#
- class torchaug.batch_transforms.BatchMixUp(alpha, inplace=False)[source]#
Mix input tensor with linear interpolation drawn according a Beta law.
The shape of the tensors is expected to be [B, …] with … any number of dimensions. The tensor should be float.
Note
The tensor is rolled according its first dimension and mixed with one drawn interpolation parameter per element in first dimension.
- Parameters:
alpha (
float) – Parameter for the Beta law.inplace (
bool, optional) – Whether to perform the operation inplace.Default:False