LSUN¶
- 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
lmdbpackage to use this dataset: runpip install lmdb- Parameters:
root (str or
pathlib.Path) – Root directory for the database files.classes (string or list) – One of {‘train’, ‘val’, ‘test’} or a list of categories to load. e,g. [‘bedroom_train’, ‘church_outdoor_train’].
transform (callable, optional) – A function/transform that takes in a PIL image and returns a transformed version. E.g,
transforms.RandomCroptarget_transform (callable, optional) – A function/transform that takes in the target and transforms it.
- Special-members: