Skip to content

Public _RandomApplyTransform class #7799

Open
@priba

Description

🚀 The feature

Make _RandomApplyTransform public for custom random apply transforms.

class _RandomApplyTransform(Transform):

The main change is to refactor _RandomApplyTransform to RandomApplyTransform, add it to the available classes in torchvision.transforms.v2.

from ._transform import Transform # usort: skip

Motivation, pitch

This class might be beneficial for custom transformations that should have Random behaviour. We are currently playing with non-standard augmentation pipelines that needs this.

I will submit a PR with this refactoring.

Alternatives

No response

Additional context

No response

cc @vfdev-5

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions