class_docstr: Base class for representing a dataset. Meant to be subclassed, with
  subclasses implementing the `get_model` function. 
class_docstr_tok: ["Base","class","for","representing","a","dataset",".","Meant","to","be","subclassed",",","with","subclasses","implementing","the","`","get_model","`","function","."]
docstr: Args:
      ds_name (str) : string identifier for the dataset
      data_path (str) : path to the dataset 
      num_classes (int) : *required kwarg*, the number of classes in
          the dataset
      mean (ch.tensor) : *required kwarg*, the mean to normalize the
          dataset with (e.g.  :samp:`ch.tensor([0.4914, 0.4822,
          0.4465])` for CIFAR-10)
      std (ch.tensor) : *required kwarg*, the standard deviation to
          normalize the dataset with (e.g. :samp:`ch.tensor([0.2023,
          0.1994, 0.2010])` for CIFAR-10)
      custom_class (type) : *required kwarg*, a
          :samp:`torchvision.models` class corresponding to the
          dataset, if it exists (otherwise :samp:`None`)
      label_mapping (dict[int,str]) : *required kwarg*, a dictionary
          mapping from class numbers to human-interpretable class
          names (can be :samp:`None`)
      transform_train (torchvision.transforms) : *required kwarg*, 
          transforms to apply to the training images from the
          dataset
      transform_test (torchvision.transforms) : *required kwarg*,
          transforms to apply to the validation images from the
          dataset
docstr_tok: ["Args",":","ds_name","(","str",")",":","string","identifier","for","the","dataset","data_path","(","str",")",":","path","to","the","dataset","num_classes","(","int",")",":","*","required","kwarg","*",",","the","number","of","classes","in","the","dataset","mean","(","ch.tensor",")",":","*","required","kwarg","*",",","the","mean","to","normalize","the","dataset","with","(","e.g",".",":","samp",":","`","ch.tensor","(","[","0.4914",",","0.4822",",","0.4465","]",")","`","for","CIFAR-10",")","std","(","ch.tensor",")",":","*","required","kwarg","*",",","the","standard","deviation","to","normalize","the","dataset","with","(","e.g",".",":","samp",":","`","ch.tensor","(","[","0.2023",",","0.1994",",","0.2010","]",")","`","for","CIFAR-10",")","custom_class","(","type",")",":","*","required","kwarg","*",",","a",":","samp",":","`","torchvision.models","`","class","corresponding","to","the","dataset",",","if","it","exists","(","otherwise",":","samp",":","`","None","`",")","label_mapping","(","dict","[","int",",","str","]",")",":","*","required","kwarg","*",",","a","dictionary","mapping","from","class","numbers","to","human-interpretable","class","names","(","can","be",":","samp",":","`","None","`",")","transform_train","(","torchvision.transforms",")",":","*","required","kwarg","*",",","transforms","to","apply","to","the","training","images","from","the","dataset","transform_test","(","torchvision.transforms",")",":","*","required","kwarg","*",",","transforms","to","apply","to","the","validation","images","from","the","dataset"]
code: def __init__(self, ds_name, data_path, **kwargs):
      """
      Args:
          ds_name (str) : string identifier for the dataset
          data_path (str) : path to the dataset
          num_classes (int) : *required kwarg*, the number of classes in
              the dataset
          mean (ch.tensor) : *required kwarg*, the mean to normalize the
              dataset with (e.g.  :samp:`ch.tensor([0.4914, 0.4822,
              0.4465])` for CIFAR-10)
          std (ch.tensor) : *required kwarg*, the standard deviation to
              normalize the dataset with (e.g. :samp:`ch.tensor([0.2023,
              0.1994, 0.2010])` for CIFAR-10)
          custom_class (type) : *required kwarg*, a
              :samp:`torchvision.models` class corresponding to the
              dataset, if it exists (otherwise :samp:`None`)
          label_mapping (dict[int,str]) : *required kwarg*, a dictionary
              mapping from class numbers to human-interpretable class
              names (can be :samp:`None`)
          transform_train (torchvision.transforms) : *required kwarg*,
              transforms to apply to the training images from the
              dataset
          transform_test (torchvision.transforms) : *required kwarg*,
              transforms to apply to the validation images from the
              dataset
      """
      required_args = [
          "num_classes",
          "mean",
          "std",
          "transform_train",
          "transform_test",
      ]
      optional_args = [
          "custom_class",
          "label_mapping",
          "custom_class_args",
      ]
  
      missing_args = set(required_args) - set(kwargs.keys())
      if len(missing_args) > 0:
          raise ValueError("Missing required args %s" % missing_args)
  
      extra_args = set(kwargs.keys()) - set(
          required_args + optional_args
      )
      if len(extra_args) > 0:
          raise ValueError("Got unrecognized args %s" % extra_args)
      final_kwargs = {
          k: kwargs.get(k, None) for k in required_args + optional_args
      }
  
      self.ds_name = ds_name
      self.data_path = data_path
      self.__dict__.update(final_kwargs)
  
imports: import pathlib
  import torch
  import torch.utils.data
  from .None import imagenet_models, cifar_models
  from torchvision import transforms, datasets
  from .tools import constants
  from .tools import openimgs_helpers
  from .None import data_augmentation
  from .None import loaders
  from .tools.helpers import get_label_mapping
label_desc: Use image node_id 1 to create a new DataSet object from inherited base classes: object with example: obj = DataSet(ds_name, data_path)