class_docstr: `FER2013
  <https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge>`_ Dataset.
  
  Args:
      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 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.
class_docstr_tok: ["`","FER2013","<","https",":","\/\/www.kaggle.com\/c\/challenges-in-representation-learning-facial-expression-recognition-challenge",">","`","_","Dataset",".","Args",":","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","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","."]
code: def __init__(
      self,
      root: str,
      split: str = "train",
      transform: Optional[Callable] = None,
      target_transform: Optional[Callable] = None,
  ) -> None:
      self._split = verify_str_arg(
          split, "split", self._RESOURCES.keys()
      )
      super().__init__(
          root, transform=transform, target_transform=target_transform
      )
  
      base_folder = pathlib.Path(self.root) / "fer2013"
      file_name, md5 = self._RESOURCES[self._split]
      data_file = base_folder / file_name
      if not check_integrity(str(data_file), md5=md5):
          raise RuntimeError(
              f"{file_name} not found in {base_folder} or corrupted. "
              f"You can download it from "
              f"https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge"
          )
  
      with open(data_file, "r", newline="") as file:
          self._samples = [
              (
                  torch.tensor(
                      [int(idx) for idx in row["pixels"].split()],
                      dtype=torch.uint8,
                  ).reshape(48, 48),
                  int(row["emotion"]) if "emotion" in row else None,
              )
              for row in csv.DictReader(file)
          ]
  
file_path: vision/torchvision/datasets/fer2013.py
imports: import csv
  import pathlib
  from typing import Any, Callable, Optional, Tuple
  import torch
  from PIL import Image
  from .utils import check_integrity, verify_str_arg
  from .vision import VisionDataset
label_desc: Use image node_id 1 to create a new FER2013 object from inherited base classes: VisionDataset with example: obj = FER2013(root, split, transform, target_transform)