LSUN — Torchvision 0.22 documentation (original) (raw)

class torchvision.datasets.LSUN(root: Union[str, Path], classes: Union[str, List[str]] = 'train', transform: Optional[Callable] = None, target_transform: Optional[Callable] = None)[source]

LSUN dataset.

You will need to install the lmdb package to use this dataset: runpip install lmdb

Parameters:

Special-members:

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

Parameters:

index (int) – Index

Returns:

Tuple (image, target) where target is the index of the target category.

Return type:

tuple