class_docstr: The Letter Image Recognition Dataset 
class_docstr_tok: ["The","Letter","Image","Recognition","Dataset"]
docstr: Letter Image Recognition Data [1]:
  open-ml-id: 6
  https://archive.ics.uci.edu/ml/datasets/Letter+Recognition - 01-01-1991
  
  The objective is to identify each of a large number of black-and-white
  rectangular pixel displays as one of the 26 capital letters in the English
  alphabet.  The character images were based on 20 different fonts and each
  letter within these 20 fonts was randomly distorted to produce a file of
  20,000 unique stimuli.  Each stimulus was converted into 16 primitive
  numerical attributes (statistical moments and edge counts) which were then
  scaled to fit into a range of integer values from 0 through 15.  We
  typically train on the first 16000 items and then use the resulting model
  to predict the letter category for the remaining 4000.  See the article
  cited above for more details.
  
  Parameters
  ----------
  root : string
      Root directory where the dataset folder `letter` exists.
  
  num_classes_per_task : int
      Number of classes per tasks. This corresponds to "N" in "N-way"
      classification.
  
  meta_train : bool (default: `False`)
      Use the meta-train split of the dataset. If set to `True`, then the
      arguments `meta_val` and `meta_test` must be set to `False`. Exactly one
      of these three arguments must be set to `True`.
  
  meta_val : bool (default: `False`)
      Use the meta-validation split of the dataset. If set to `True`, then the
      arguments `meta_train` and `meta_test` must be set to `False`. Exactly
      one of these three arguments must be set to `True`.
  
  meta_test : bool (default: `False`)
      Use the meta-test split of the dataset. If set to `True`, then the
      arguments `meta_train` and `meta_val` must be set to `False`. Exactly
      one of these three arguments must be set to `True`.
  
  meta_split : string in {'train', 'val', 'test'}, optional
      Name of the split to use. This overrides the arguments `meta_train`,
      `meta_val` and `meta_test` if all three are set to `False`.
  
  transform : callable, optional
      A function/transform that takes a numpy array or a pytorch array
      (depending when the transforms is applied), and returns a transformed
      version.
  
  target_transform : callable, optional
      A function/transform that takes a target, and returns a transformed
      version.
  
  dataset_transform : callable, optional
      A function/transform that takes a dataset (ie. a task), and returns a
      transformed version of it. E.g. `torchmeta.transforms.ClassSplitter()`.
  
  class_augmentations : list of callable, optional
      A list of functions that augment the dataset with new classes. These
      classes are transformations of existing classes.
  
  download : bool (default: `False`)
      If `True`, downloads the original files and processes the dataset in the
      root directory (under the `letter` folder). If the dataset
      is already available, this does not download/process the dataset again.
  
  References
  -----
  [1] P. W. Frey and D. J. Slate. "Letter Recognition Using Holland-style
  Adaptive Classifiers". Machine Learning 6(2), 1991
docstr_tok: ["Letter","Image","Recognition","Data","[","1","]",":","open-ml-id",":","6","https",":","\/\/archive.ics.uci.edu\/ml\/datasets\/Letter+Recognition","-","01-01-1991","The","objective","is","to","identify","each","of","a","large","number","of","black-and-white","rectangular","pixel","displays","as","one","of","the","26","capital","letters","in","the","English","alphabet",".","The","character","images","were","based","on","20","different","fonts","and","each","letter","within","these","20","fonts","was","randomly","distorted","to","produce","a","file","of","20,000","unique","stimuli",".","Each","stimulus","was","converted","into","16","primitive","numerical","attributes","(","statistical","moments","and","edge","counts",")","which","were","then","scaled","to","fit","into","a","range","of","integer","values","from","0","through","15",".","We","typically","train","on","the","first","16000","items","and","then","use","the","resulting","model","to","predict","the","letter","category","for","the","remaining","4000",".","See","the","article","cited","above","for","more","details",".","Parameters","--","--","--","--","--","root",":","string","Root","directory","where","the","dataset","folder","`","letter","`","exists",".","num_classes_per_task",":","int","Number","of","classes","per","tasks",".","This","corresponds","to","``","N","''","in","``","N-way","''","classification",".","meta_train",":","bool","(","default",":","`","False","`",")","Use","the","meta-train","split","of","the","dataset",".","If","set","to","`","True","`",",","then","the","arguments","`","meta_val","`","and","`","meta_test","`","must","be","set","to","`","False","`",".","Exactly","one","of","these","three","arguments","must","be","set","to","`","True","`",".","meta_val",":","bool","(","default",":","`","False","`",")","Use","the","meta-validation","split","of","the","dataset",".","If","set","to","`","True","`",",","then","the","arguments","`","meta_train","`","and","`","meta_test","`","must","be","set","to","`","False","`",".","Exactly","one","of","these","three","arguments","must","be","set","to","`","True","`",".","meta_test",":","bool","(","default",":","`","False","`",")","Use","the","meta-test","split","of","the","dataset",".","If","set","to","`","True","`",",","then","the","arguments","`","meta_train","`","and","`","meta_val","`","must","be","set","to","`","False","`",".","Exactly","one","of","these","three","arguments","must","be","set","to","`","True","`",".","meta_split",":","string","in","{","'train","'",",","'val","'",",","'test","'","}",",","optional","Name","of","the","split","to","use",".","This","overrides","the","arguments","`","meta_train","`",",","`","meta_val","`","and","`","meta_test","`","if","all","three","are","set","to","`","False","`",".","transform",":","callable",",","optional","A","function\/transform","that","takes","a","numpy","array","or","a","pytorch","array","(","depending","when","the","transforms","is","applied",")",",","and","returns","a","transformed","version",".","target_transform",":","callable",",","optional","A","function\/transform","that","takes","a","target",",","and","returns","a","transformed","version",".","dataset_transform",":","callable",",","optional","A","function\/transform","that","takes","a","dataset","(","ie",".","a","task",")",",","and","returns","a","transformed","version","of","it",".","E.g",".","`","torchmeta.transforms.ClassSplitter","(",")","`",".","class_augmentations",":","list","of","callable",",","optional","A","list","of","functions","that","augment","the","dataset","with","new","classes",".","These","classes","are","transformations","of","existing","classes",".","download",":","bool","(","default",":","`","False","`",")","If","`","True","`",",","downloads","the","original","files","and","processes","the","dataset","in","the","root","directory","(","under","the","`","letter","`","folder",")",".","If","the","dataset","is","already","available",",","this","does","not","download\/process","the","dataset","again",".","References","--","--","-","[","1","]","P.","W.","Frey","and","D.","J",".","Slate",".","``","Letter","Recognition","Using","Holland-style","Adaptive","Classifiers","''",".","Machine","Learning","6","(","2",")",",","1991"]
code: def __init__(
      self,
      root,
      num_classes_per_task=None,
      meta_train=False,
      meta_val=False,
      meta_test=False,
      meta_split=None,
      transform=None,
      target_transform=None,
      dataset_transform=None,
      class_augmentations=None,
      download=False,
  ):
      """
      Letter Image Recognition Data [1]:
      open-ml-id: 6
      https://archive.ics.uci.edu/ml/datasets/Letter+Recognition - 01-01-1991
  
      The objective is to identify each of a large number of black-and-white
      rectangular pixel displays as one of the 26 capital letters in the English
      alphabet.  The character images were based on 20 different fonts and each
      letter within these 20 fonts was randomly distorted to produce a file of
      20,000 unique stimuli.  Each stimulus was converted into 16 primitive
      numerical attributes (statistical moments and edge counts) which were then
      scaled to fit into a range of integer values from 0 through 15.  We
      typically train on the first 16000 items and then use the resulting model
      to predict the letter category for the remaining 4000.  See the article
      cited above for more details.
  
      Parameters
      ----------
      root : string
          Root directory where the dataset folder `letter` exists.
  
      num_classes_per_task : int
          Number of classes per tasks. This corresponds to "N" in "N-way"
          classification.
  
      meta_train : bool (default: `False`)
          Use the meta-train split of the dataset. If set to `True`, then the
          arguments `meta_val` and `meta_test` must be set to `False`. Exactly one
          of these three arguments must be set to `True`.
  
      meta_val : bool (default: `False`)
          Use the meta-validation split of the dataset. If set to `True`, then the
          arguments `meta_train` and `meta_test` must be set to `False`. Exactly
          one of these three arguments must be set to `True`.
  
      meta_test : bool (default: `False`)
          Use the meta-test split of the dataset. If set to `True`, then the
          arguments `meta_train` and `meta_val` must be set to `False`. Exactly
          one of these three arguments must be set to `True`.
  
      meta_split : string in {'train', 'val', 'test'}, optional
          Name of the split to use. This overrides the arguments `meta_train`,
          `meta_val` and `meta_test` if all three are set to `False`.
  
      transform : callable, optional
          A function/transform that takes a numpy array or a pytorch array
          (depending when the transforms is applied), and returns a transformed
          version.
  
      target_transform : callable, optional
          A function/transform that takes a target, and returns a transformed
          version.
  
      dataset_transform : callable, optional
          A function/transform that takes a dataset (ie. a task), and returns a
          transformed version of it. E.g. `torchmeta.transforms.ClassSplitter()`.
  
      class_augmentations : list of callable, optional
          A list of functions that augment the dataset with new classes. These
          classes are transformations of existing classes.
  
      download : bool (default: `False`)
          If `True`, downloads the original files and processes the dataset in the
          root directory (under the `letter` folder). If the dataset
          is already available, this does not download/process the dataset again.
  
      References
      -----
      [1] P. W. Frey and D. J. Slate. "Letter Recognition Using Holland-style
      Adaptive Classifiers". Machine Learning 6(2), 1991
      """
      dataset = LetterClassDataset(
          root,
          meta_train=meta_train,
          meta_val=meta_val,
          meta_test=meta_test,
          meta_split=meta_split,
          transform=transform,
          class_augmentations=class_augmentations,
          download=download,
      )
      super(Letter, self).__init__(
          dataset,
          num_classes_per_task,
          target_transform=target_transform,
          dataset_transform=dataset_transform,
      )
  
imports: import numpy
  import os
  import json
  import h5py
  from tqdm import tqdm
  from torchmeta.utils.data import Dataset, ClassDataset, CombinationMetaDataset
  from torchmeta.datasets.utils import get_asset
label_desc: Use image node_id 1 to create a new Letter object from inherited base classes: CombinationMetaDataset with example: obj = Letter(root, num_classes_per_task, meta_train, meta_val, meta_test, meta_split, transform, target_transform, dataset_transform, class_augmentations, download)