class_docstr: CustomImagenet Dataset 
  
  A subset of ImageNet with the user-specified labels
  
  To initialize, just provide the path to the full ImageNet dataset
  along with a list of lists of wnids to be grouped together
  (no special formatting required).
class_docstr_tok: ["CustomImagenet","Dataset","A","subset","of","ImageNet","with","the","user-specified","labels","To","initialize",",","just","provide","the","path","to","the","full","ImageNet","dataset","along","with","a","list","of","lists","of","wnids","to","be","grouped","together","(","no","special","formatting","required",")","."]
docstr_tok: []
code: def __init__(self, data_path, custom_grouping, **kwargs):
      """ """
      ds_name = "custom_imagenet"
      ds_kwargs = {
          "num_classes": len(custom_grouping),
          "mean": ch.tensor([0.4717, 0.4499, 0.3837]),
          "std": ch.tensor([0.2600, 0.2516, 0.2575]),
          "custom_class": None,
          "label_mapping": get_label_mapping(ds_name, custom_grouping),
          "transform_train": da.TRAIN_TRANSFORMS_IMAGENET,
          "transform_test": da.TEST_TRANSFORMS_IMAGENET,
      }
      ds_kwargs = self.override_args(ds_kwargs, kwargs)
      super(CustomImageNet, self).__init__(
          ds_name, data_path, **ds_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 CustomImageNet object from inherited base classes: DataSet with example: obj = CustomImageNet(data_path, custom_grouping)