# draugr.torch_utilities.operations.torch_transforms.batch_transforms.BatchRandomCrop

class draugr.torch_utilities.operations.torch_transforms.batch_transforms.BatchRandomCrop(size, padding=None, dtype=torch.float32, device='cpu')

  Bases: `object`

  Applies the `RandomCrop` transform to a batch of images. Args: size (int): Desired output size of the crop. padding (int, optional): Optional padding on each border of the image.

  > Default is None, i.e no padding.

  dtype (torch.dtype,optional): The data type of tensors to which the transform will be applied. device (torch.device,optional): The device of tensors to which the transform will be applied.

  __init__(size, padding=None, dtype=torch.float32, device='cpu')

  Methods

  `__init__`(size[, padding, dtype, device]) |