CIFAR10H

class probly.datasets.torch.CIFAR10H(root: str | Path, transform: Callable[..., Any] | None = None, *, download: bool = False)[source]

Bases: CIFAR10

A Dataset class for the CIFAR10H dataset introduced in [PBGR19].

The dataset can be found at https://github.com/jcpeterson/cifar-10h.

Initialize an instance of the CIFAR10H class.

Parameters:
  • root – Root directory of the dataset.

  • transform – Optional transform to apply to the data.

  • download – Whether to download the CIFAR10 images and the CIFAR-10H human annotations if missing.

Raises:

RuntimeError – If the CIFAR-10H annotations are missing and download is False.

base_folder = 'cifar-10-batches-py'
cifar10h_filename = 'cifar10h-counts.npy'
cifar10h_folder = 'cifar-10h'
cifar10h_md5 = 'f1284b6fba48a67d3db69bbafb5685ad'
cifar10h_url = 'https://raw.githubusercontent.com/jcpeterson/cifar-10h/master/data/cifar10h-counts.npy'
counts: Tensor

Tensor of size (n_instances, n_classes) with raw human annotation counts.

download() None[source]
extra_repr() str[source]
filename = 'cifar-10-python.tar.gz'
meta = {'filename': 'batches.meta', 'key': 'label_names', 'md5': '5ff9c542aee3614f3951f8cda6e48888'}
targets: Tensor

Tensor of size (n_instances, n_classes), first-order distribution.

test_list = [['test_batch', '40351d587109b95175f43aff81a1287e']]
tgz_md5 = 'c58f30108f718f92721af3b95e74349a'
train_list = [['data_batch_1', 'c99cafc152244af753f735de768cd75f'], ['data_batch_2', 'd4bba439e000b95fd0a9bffe97cbabec'], ['data_batch_3', '54ebc095f3ab1f0389bbae665268c751'], ['data_batch_4', '634d18415352ddfa80567beed471001a'], ['data_batch_5', '482c414d41f54cd18b22e5b47cb7c3cb']]
url = 'https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz'