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 _onnx_batch_images(self, images, size_divisible=32):
      # type: (List[Tensor], int) -> 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 List, Tuple, Dict, Optional
  import torch
  from torch import nn, Tensor
  import torch.nn.functional
  import torchvision
  from .image_list import ImageList
label_desc: Use image node_id 5 for calling the GeneralizedRCNNTransform obj's underlying member method code with example usage: obj._onnx_batch_images(images, size_divisible) and returns: torch