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 _onnx_batch_images(
      self, images: List[Tensor], size_divisible: int = 32
  ) -> Tensor:
      max_size = []
      for i in range(images[0].dim()):
          max_size_i = torch.max(
              torch.stack([img.shape[i] for img in images]).to(
                  torch.float32
              )
          ).to(torch.int64)
          max_size.append(max_size_i)
      stride = size_divisible
      max_size[1] = (
          torch.ceil((max_size[1].to(torch.float32)) / stride) * stride
      ).to(torch.int64)
      max_size[2] = (
          torch.ceil((max_size[2].to(torch.float32)) / stride) * stride
      ).to(torch.int64)
      max_size = tuple(max_size)
  
      # work around for
      # pad_img[: img.shape[0], : img.shape[1], : img.shape[2]].copy_(img)
      # which is not yet supported in onnx
      padded_imgs = []
      for img in images:
          padding = [
              (s1 - s2) for s1, s2 in zip(max_size, tuple(img.shape))
          ]
          padded_img = torch.nn.functional.pad(
              img, (0, padding[2], 0, padding[1], 0, padding[0])
          )
          padded_imgs.append(padded_img)
  
      return torch.stack(padded_imgs)
  
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 6 for calling the GeneralizedRCNNTransform obj's underlying member method code with example usage: obj._onnx_batch_images(images, size_divisible) and returns: torch