Skip to content

all_ops argument of AugMix() accepts many types of valuesΒ #8956

Open
@hyperkai

Description

@hyperkai

πŸ› Describe the bug

The doc of AugMix() says that all_ops parameter is bool as shown below:

Parameters:
...

  • all_ops (bool, optional) – Use all operations (including brightness, contrast, color and sharpness). Default is True.

But all_ops argument accepts many types of values as shown below:

from torchvision.datasets import OxfordIIITPet
from torchvision.transforms.v2 import AugMix

my_data = OxfordIIITPet(
    root="data",
    transform=AugMix(all_ops=3.+0.j)
    # transform=AugMix(all_ops="Hello")
    # transform=AugMix(all_ops=[])
    # transform=AugMix(all_ops=None)
)

my_data[0]
# (<PIL.Image.Image image mode=RGB size=394x500>, 0)

Versions

import torchvision

torchvision.__version__ # '0.20.1'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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