Shortcuts

Imagenette

class torchvision.datasets.Imagenette(root: str, split: str = 'train', size: str = 'full', download=False, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None)[source]

Imagenette image classification dataset.

Parameters:
  • root (string) – Root directory of the Imagenette dataset.

  • split (string, optional) – The dataset split. Supports "train" (default), and "val".

  • size (string, optional) – The image size. Supports "full" (default), "320px", and "160px".

  • 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 – A function/transform that takes in the target and transforms it.

Special-members:

__getitem__(idx: int) Tuple[Any, Any][source]
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