CIFAR10 — Torchvision 0.22 documentation (original) (raw)

class torchvision.datasets.CIFAR10(root: Union[str, Path], train: bool = True, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False)[source]

CIFAR10 Dataset.

Parameters:

Special-members:

__getitem__(index: int) → Tuple[Any, Any][source]

Parameters:

index (int) – Index

Returns:

(image, target) where target is index of the target class.

Return type:

tuple