Skip to content

Setting the 2D list of str type to RandomRotation(), RandomHorizontalFlip() and RandomVerticalFlip() after instantiation works #8862

Open
@hyperkai

Description

🐛 Describe the bug

Setting the 2D list of str type to RandomRotation(), RandomHorizontalFlip() and RandomVerticalFlip() after instantiation works as shown below:

from torchvision.transforms.v2 import RandomRotation
from torchvision.transforms.v2 import RandomHorizontalFlip
from torchvision.transforms.v2 import RandomVerticalFlip

rr = RandomRotation(degrees=0)
rr([['Hello']])
# [['Hello']]

rhf = RandomHorizontalFlip(p=0)
rhf([['Hello']])
#[['Hello']]

rvf = RandomVerticalFlip(p=0)
rvf ([['Hello']])
# [['Hello']]

I think it's problematic to accept the 2D list of str type because the function is for an image.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions