class_docstr: Performs input / target transformation before feeding the data to a GeneralizedRCNN
  model.
  
  The transformations it performs are:
      - input normalization (mean subtraction and std division)
      - input / target resizing to match min_size / max_size
  
  It returns a ImageList for the inputs, and a List[Dict[Tensor]] for the targets
class_docstr_tok: ["Performs","input","\/","target","transformation","before","feeding","the","data","to","a","GeneralizedRCNN","model",".","The","transformations","it","performs","are",":","-","input","normalization","(","mean","subtraction","and","std","division",")","-","input","\/","target","resizing","to","match","min_size","\/","max_size","It","returns","a","ImageList","for","the","inputs",",","and","a","List","[","Dict","[","Tensor","]","]","for","the","targets"]
code: def resize(
      self,
      image: Tensor,
      target: Optional[Dict[str, Tensor]] = None,
  ) -> Tuple[Tensor, Optional[Dict[str, Tensor]]]:
      h, w = image.shape[-2:]
      if self.training:
          if self._skip_resize:
              return image, target
          size = self.torch_choice(self.min_size)
      else:
          size = self.min_size[-1]
      image, target = _resize_image_and_masks(
          image, size, self.max_size, target, self.fixed_size
      )
  
      if target is None:
          return image, target
  
      bbox = target["boxes"]
      bbox = resize_boxes(bbox, (h, w), image.shape[-2:])
      target["boxes"] = bbox
  
      if "keypoints" in target:
          keypoints = target["keypoints"]
          keypoints = resize_keypoints(
              keypoints, (h, w), image.shape[-2:]
          )
          target["keypoints"] = keypoints
      return image, target
  
imports: import math
  from typing import Any, Dict, List, Optional, Tuple
  import torch
  import torchvision
  from torch import nn, Tensor
  from .image_list import ImageList
  from .roi_heads import paste_masks_in_image
label_desc: Use image node_id 5 for calling the GeneralizedRCNNTransform obj's underlying member method code with example usage: obj.resize(image, target) and returns: image,  target, image,  target, image,  target