class_docstr: RestrictedImagenet Dataset [TSE+19]_
  
  A subset of ImageNet with the following labels:
  
  * Dog (classes 151-268)
  * Cat (classes 281-285)
  * Frog (classes 30-32)
  * Turtle (classes 33-37)
  * Bird (classes 80-100)
  * Monkey (classes 365-382)
  * Fish (classes 389-397)
  * Crab (classes 118-121)
  * Insect (classes 300-319)
  
  To initialize, just provide the path to the full ImageNet dataset
  (no special formatting required).
  
  .. [TSE+19] Tsipras, D., Santurkar, S., Engstrom, L., Turner, A., &
      Madry, A. (2019). Robustness May Be at Odds with Accuracy. ICLR
      2019.
class_docstr_tok: ["RestrictedImagenet","Dataset","[","TSE+19","]","_","A","subset","of","ImageNet","with","the","following","labels",":","*","Dog","(","classes","151-268",")","*","Cat","(","classes","281-285",")","*","Frog","(","classes","30-32",")","*","Turtle","(","classes","33-37",")","*","Bird","(","classes","80-100",")","*","Monkey","(","classes","365-382",")","*","Fish","(","classes","389-397",")","*","Crab","(","classes","118-121",")","*","Insect","(","classes","300-319",")","To","initialize",",","just","provide","the","path","to","the","full","ImageNet","dataset","(","no","special","formatting","required",")",".","..","[","TSE+19","]","Tsipras",",","D.",",","Santurkar",",","S.",",","Engstrom",",","L.",",","Turner",",","A.",",","&","Madry",",","A",".","(","2019",")",".","Robustness","May","Be","at","Odds","with","Accuracy",".","ICLR","2019","."]
docstr_tok: []
code: def __init__(self, data_path, **kwargs):
      """ """
      ds_name = "restricted_imagenet"
      ds_kwargs = {
          "num_classes": len(constants.RESTRICTED_IMAGNET_RANGES),
          "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, constants.RESTRICTED_IMAGNET_RANGES
          ),
          "transform_train": da.TRAIN_TRANSFORMS_IMAGENET,
          "transform_test": da.TEST_TRANSFORMS_IMAGENET,
      }
      ds_kwargs = self.override_args(ds_kwargs, kwargs)
      super(RestrictedImageNet, 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 RestrictedImageNet object from inherited base classes: DataSet with example: obj = RestrictedImageNet(data_path)