Open
Description
π Describe the bug
The doc of AugMix()
says that chain_depth
parameter is int
as shown below:
Parameters:
- ...
- chain_depth (int) β The depth of augmentation chains. A negative value denotes stochastic
So, setting the value of 1 <= x
to chain_depth
argument gets the error properly as shown below:
from torchvision.datasets import OxfordIIITPet
from torchvision.transforms.v2 import AugMix
my_data = OxfordIIITPet(
root="data",
transform=AugMix(chain_depth=1.0)
# transform=AugMix(chain_depth=2.0)
# transform=AugMix(chain_depth=3.0)
)
my_data[0] # Error
TypeError: 'float' object cannot be interpreted as an integer
But setting the value of x <= 0
to chain_depth
argument doesn't get error against the doc as shown below:
from torchvision.datasets import OxfordIIITPet
from torchvision.transforms.v2 import AugMix
my_data = OxfordIIITPet(
root="data",
transform=AugMix(chain_depth=0.0)
# transform=AugMix(chain_depth=-1.0)
# transform=AugMix(chain_depth=-2.0)
# transform=AugMix(chain_depth=-3.0)
)
my_data[0]
# (<PIL.Image.Image image mode=RGB size=394x500>, 0)
Versions
import torchvision
torchvision.__version__ # '0.20.1'
Metadata
Metadata
Assignees
Labels
No labels
Activity