Open
Description
🐛 Describe the bug
Dirichlet() is used for alpha
argument of AugMix()
, then setting the value of x <= 0
to concentration
argument of Dirichlet()
gets error as shown below:
from torch.distributions.dirichlet import Dirichlet
import torch
Dirichlet(concentration=torch.tensor([0.0])) # Error
Dirichlet(concentration=torch.tensor([-1.0])) # Error
Dirichlet(concentration=torch.tensor([-2.0])) # Error
But setting the value of x <= 0
to alpha
argument of AugMix()
doesn't get error as shown below:
from torchvision.datasets import OxfordIIITPet
from torchvision.transforms.v2 import AugMix
my_data = OxfordIIITPet(
root="data",
transform=AugMix(alpha=0.0)
# transform=AugMix(alpha=-1.0)
# transform=AugMix(alpha=-2.0)
)
my_data[0]
# (<PIL.Image.Image image mode=RGB size=394x500>, 0)
So, setting the value of x <= 0
to alpha
argument of AugMix()
should get error same as concentration
argument of Dirichlet().
Versions
import torchvision
torchvision.__version__ # '0.20.1'
Metadata
Metadata
Assignees
Labels
No labels
Activity