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.csv
ORicml_face_data.csv
are present inroot/fer2013/
. If onlytrain.csv
andtest.csv
are present, the test labels are set toNone
.- Parameters:
root (str or
pathlib.Path
) – Root directory of dataset where directoryroot/fer2013
exists. This directory may contain eitherfer2013.csv
,icml_face_data.csv
, or bothtrain.csv
andtest.csv
. Precendence is given in that order, i.e. iffer2013.csv
is 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.csv
andicml_face_data.csv
are 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.RandomCrop
target_transform (callable, optional) – A function/transform that takes in the target and transforms it.
- Special-members: