CIFAR10N#

class torch_uncertainty.datasets.classification.CIFAR10N(root, train=True, file_arg='aggre_label', transform=None, target_transform=None, download=False)[source]#

CIFAR-10N Dataset.

Parameters:
  • root (str | Path) – Root directory of dataset where file cifar-10h-probs.npy exists or will be saved to if download is set to True.

  • train (bool) – For API consistency, not used.

  • file_arg (Literal['aggre_label', 'worse_label', 'random_label1', 'random_label2', 'random_label3']) – The type of label noise to use. One of the following: "aggre_label", "worse_label", "random_label1", "random_label2", "random_label3".

  • transform (Callable[..., Any] | None) – A function/transform that takes in a PIL image and returns a transformed version. E.g, transforms.RandomCrop. Defaults to None.

  • target_transform (Callable[..., Any] | None) – A function/transform that takes in the target and transforms it. Defaults to None.

  • download (bool) – If True, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again. Defaults to False.