class_docstr: Performs input / target transformation before feeding the data to a GeneralizedRCNN
  model.
  
  The transformations it perform 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","perform","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 forward(
      self,
      images,  # type: List[Tensor]
      targets=None,  # type: Optional[List[Dict[str, Tensor]]]
  ):
      # type: (...) -> Tuple[ImageList, Optional[List[Dict[str, Tensor]]]]
      images = [img for img in images]
      for i in range(len(images)):
          image = images[i]
          target_index = targets[i] if targets is not None else None
  
          if image.dim() != 3:
              raise ValueError(
                  "images is expected to be a list of 3d tensors "
                  "of shape [C, H, W], got {}".format(image.shape)
              )
          image = self.normalize(image)  # 对图像进行标准化处理
          image, target_index = self.resize(
              image, target_index
          )  # 对图像和对应的bboxes缩放到指定范围
          images[i] = image
          if targets is not None and target_index is not None:
              targets[i] = target_index
  
      # 记录resize后的图像尺寸
      image_sizes = [img.shape[-2:] for img in images]
      images = self.batch_images(images)  # 将images打包成一个batch
      image_sizes_list = torch.jit.annotate(List[Tuple[int, int]], [])
  
      for image_size in image_sizes:
          assert len(image_size) == 2
          image_sizes_list.append((image_size[0], image_size[1]))
  
      image_list = ImageList(images, image_sizes_list)
      return image_list, targets
  
imports: import math
  from typing import List, Tuple, Dict, Optional
  import torch
  from torch import nn, Tensor
  import torchvision
  from .image_list import ImageList
label_desc: Use image node_id 10 for calling the GeneralizedRCNNTransform obj's underlying member method code with example usage: obj.forward(images, targets) and returns: image_list,  targets