Shortcuts

FER2013

class torchvision.datasets.FER2013(root: str, split: str = 'train', transform: Optional[Callable] = None, target_transform: Optional[Callable] = None)[source]

FER2013 Dataset.

Parameters:
  • root (string) – Root directory of dataset where directory root/fer2013 exists.

  • split (string, optional) – The dataset split, supports "train" (default), or "test".

  • 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.

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