FER2013¶
- class torchvision.datasets.FER2013(root: Union[str, Path], split: str = 'train', transform: Optional[Callable] = None, target_transform: Optional[Callable] = None)[source]¶
FER2013 Dataset.
Note
This dataset can return test labels only if
fer2013.csvORicml_face_data.csvare present inroot/fer2013/. If onlytrain.csvandtest.csvare present, the test labels are set toNone.- Parameters:
root (str or
pathlib.Path) – Root directory of dataset where directoryroot/fer2013exists. This directory may contain eitherfer2013.csv,icml_face_data.csv, or bothtrain.csvandtest.csv. Precendence is given in that order, i.e. iffer2013.csvis present then the rest of the files will be ignored. All these (combinations of) files contain the same data and are supported for convenience, but onlyfer2013.csvandicml_face_data.csvare able to return non-None test labels.split (string, optional) – The dataset split, supports
"train"(default), or"test".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: