Table of Contents
Shortcuts

# Places365

class torchvision.datasets.Places365(root: str, split: str = 'train-standard', small: bool = False, download: bool = False, transform: ~typing.Optional[~typing.Callable] = None, target_transform: ~typing.Optional[~typing.Callable] = None, loader: ~typing.Callable[[str], ~typing.Any] = <function default_loader>)

  Places365 classification dataset.

  Parameters:

    - root (string) – Root directory of the Places365 dataset.

    - split (string, optional) – The dataset split. Can be one of `train-standard` (default), `train-challenge`, `val`.

    - small (bool, optional) – If `True`, uses the small images, i.e. resized to 256 x 256 pixels, instead of the high resolution ones.

    - download (bool, optional) – If `True`, downloads the dataset components and places them in `root`. Already downloaded archives are not downloaded again.

    - transform (callable, optional) – A function/transform that takes in an PIL image and returns a transformed version. E.g, `transforms.RandomCrop`

    - target_transform (callable, optional) – A function/transform that takes in the target and transforms it.

    - loader – A function to load an image given its path.

  Raises:

    - RuntimeError – If `download is False` and the meta files, i.e. the devkit, are not present or corrupted.

    - RuntimeError – If `download is True` and the image archive is already extracted.

  Special-members:

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

      index (int) – Index

    Returns:

      Sample and meta data, optionally transformed by the respective transforms.

    Return type:

      (Any)

## Docs

Access comprehensive developer documentation for PyTorch

View Docs

## Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

## Resources

Find development resources and get your questions answered

View Resources

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.