Setting the 2D list of str
type to RandomRotation()
, RandomHorizontalFlip()
and RandomVerticalFlip()
after instantiation works #8862
Open
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
Labels
No labels