class_docstr: Default transform for images used in the classification task
  
  This transform does several things. First, it expects a tuple or
  list input (torchvision datasets supply tuples / lists). Second,
  it applies a user-provided image transforms to the first entry in
  the tuple (again, matching the torchvision tuple format). Third,
  it transforms the tuple to a dict sample with entries "input" and
  "target".
  
  The defaults are for the standard imagenet augmentations
  
  This is just a convenience wrapper to cover the common
  use-case. You can get the same behavior by composing `torchvision
  transforms <https://pytorch.org/docs/stable/torchvision/transforms.html>`_
  + :class:`ApplyTransformToKey` + :class:`TupleToMapTransform`.
class_docstr_tok: ["Default","transform","for","images","used","in","the","classification","task","This","transform","does","several","things",".","First",",","it","expects","a","tuple","or","list","input","(","torchvision","datasets","supply","tuples","\/","lists",")",".","Second",",","it","applies","a","user-provided","image","transforms","to","the","first","entry","in","the","tuple","(","again",",","matching","the","torchvision","tuple","format",")",".","Third",",","it","transforms","the","tuple","to","a","dict","sample","with","entries","``","input","''","and","''","target","''",".","The","defaults","are","for","the","standard","imagenet","augmentations","This","is","just","a","convenience","wrapper","to","cover","the","common","use-case",".","You","can","get","the","same","behavior","by","composing","`","torchvision","transforms","<","https",":","\/\/pytorch.org\/docs\/stable\/torchvision\/transforms.html",">","`","_","+",":","class",":","`","ApplyTransformToKey","`","+",":","class",":","`","TupleToMapTransform","`","."]
docstr: Constructor for GenericImageTransfrom
  Only one of the two arguments (*transform*, *split*) should be specified.
  Args:
      transform: A callable or ClassyTransform to be applied to the image only
      split: 'train' or 'test'
docstr_tok: ["Constructor","for","GenericImageTransfrom","Only","one","of","the","two","arguments","(","*","transform","*",",","*","split","*",")","should","be","specified",".","Args",":","transform",":","A","callable","or","ClassyTransform","to","be","applied","to","the","image","only","split",":","'train","'","or","'test","'"]
code: def __init__(
      self,
      transform: Optional[Callable] = None,
      split: Optional[str] = None,
  ):
      """Constructor for GenericImageTransfrom
      Only one of the two arguments (*transform*, *split*) should be specified.
      Args:
          transform: A callable or ClassyTransform to be applied to the image only
          split: 'train' or 'test'
      """
      assert (
          split is None or transform is None
      ), "If split is not None then transform must be None"
      assert split in [None, "train", "test"], (
          "If specified, split should be either 'train' or 'test', "
          "instead got {}".format(split)
      )
  
      self._transform = transform
      if split is not None:
          self._transform = (
              ImagenetAugmentTransform()
              if split == "train"
              else ImagenetNoAugmentTransform()
          )
  
imports: import collections
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torchvision.transforms
  from .None import build_transforms, ClassyTransform, register_transform
label_desc: Use image node_id 1 to create a new GenericImageTransform object from inherited base classes: ClassyTransform with example: obj = GenericImageTransform(transform, split)