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"]
docstr: Implements `random.choice` via torch ops, so it can be compiled with
  TorchScript and we use PyTorch's RNG (not native RNG)
docstr_tok: ["Implements","`","random.choice","`","via","torch","ops",",","so","it","can","be","compiled","with","TorchScript","and","we","use","PyTorch","'s","RNG","(","not","native","RNG",")"]
code: def torch_choice(self, k: List[int]) -> int:
      """
      Implements `random.choice` via torch ops, so it can be compiled with
      TorchScript and we use PyTorch's RNG (not native RNG)
      """
      index = int(torch.empty(1).uniform_(0.0, float(len(k))).item())
      return k[index]
  
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 4 for calling the GeneralizedRCNNTransform obj's underlying member method code with example usage: obj.torch_choice(k) and returns: k