class_docstr: Tiny Imagenet Pytorch Dataset
docstr: Creates an instance of the Tiny Imagenet dataset.
  
  :param root: folder in which to download dataset. Defaults to None,
      which means that the default location for 'tinyimagenet' will be
      used.
  :param train: True for training set, False for test set.
  :param transform: Pytorch transformation function for x.
  :param target_transform: Pytorch transformation function for y.
  :param loader: the procedure to load the instance from the storage.
  :param bool download: If True, the dataset will be  downloaded if
      needed.
docstr_tok: ["Creates","an","instance","of","the","Tiny","Imagenet","dataset",".",":","param","root",":","folder","in","which","to","download","dataset",".","Defaults","to","None",",","which","means","that","the","default","location","for","'tinyimagenet","'","will","be","used",".",":","param","train",":","True","for","training","set",",","False","for","test","set",".",":","param","transform",":","Pytorch","transformation","function","for","x.",":","param","target_transform",":","Pytorch","transformation","function","for","y.",":","param","loader",":","the","procedure","to","load","the","instance","from","the","storage",".",":","param","bool","download",":","If","True",",","the","dataset","will","be","downloaded","if","needed","."]
code: def __init__(
      self,
      root: Optional[Union[str, Path]] = None,
      *,
      train: bool = True,
      transform=None,
      target_transform=None,
      loader=default_loader,
      download=True,
  ):
      """
      Creates an instance of the Tiny Imagenet dataset.
  
      :param root: folder in which to download dataset. Defaults to None,
          which means that the default location for 'tinyimagenet' will be
          used.
      :param train: True for training set, False for test set.
      :param transform: Pytorch transformation function for x.
      :param target_transform: Pytorch transformation function for y.
      :param loader: the procedure to load the instance from the storage.
      :param bool download: If True, the dataset will be  downloaded if
          needed.
      """
  
      if root is None:
          root = default_dataset_location("tinyimagenet")
  
      self.transform = transform
      self.target_transform = target_transform
      self.train = train
      self.loader = loader
  
      super(TinyImagenet, self).__init__(
          root,
          self.filename[1],
          self.md5,
          download=download,
          verbose=True,
      )
  
      self._load_dataset()
  
file_path: avalanche/avalanche/benchmarks/datasets/tiny_imagenet/tiny_imagenet.py
imports: import csv
  from pathlib import Path
  from typing import List, Optional, Tuple, Union
  from torchvision.datasets.folder import default_loader
  from torchvision.transforms import ToTensor
  from avalanche.benchmarks.datasets import SimpleDownloadableDataset, default_dataset_location
label_desc: Use image node_id 1 to create a new TinyImagenet object from inherited base classes: SimpleDownloadableDataset with example: obj = TinyImagenet(root)