batch_adjust_contrast#
- torchaug.batch_transforms.functional.batch_adjust_contrast(imgs, contrast_factor, value_check=False)[source]#
Adjust contrast of a batch of images.
- Parameters:
imgs (
Tensor) – Batch of images to be adjusted. It is expected to be in [B, …, 1 or 3, H, W] format, where … means it can have an arbitrary number dimensions.contrast_factor (
Tensor) – How much to adjust the contrast. Can be any 1 or B non-negative number. 0 gives a solid gray image, 1 gives the original image while 2 increases the contrast by a factor of 2.value_check (
bool, optional) – Bool to perform tensor value check. Might cause slow down on some devices because of synchronization.Default:False- Return type:
Tensor- Returns:
Contrast adjusted batch of images.