transform_random_apply: Apply a list of transformations randomly with a given...

View source: R/transforms-generics.R

transform_random_applyR Documentation

Apply a list of transformations randomly with a given probability

Description

Apply a list of transformations randomly with a given probability

Usage

transform_random_apply(img, transforms, p = 0.5)

Arguments

img

A magick-image, array or torch_tensor.

transforms

(list or tuple): list of transformations.

p

(float): probability.

See Also

Other combining_transforms: transform_five_crop(), transform_random_choice(), transform_random_order(), transform_resized_crop(), transform_ten_crop()


torchvision documentation built on Nov. 6, 2025, 9:07 a.m.