class_docstr: The random crop and resize augmentation proposed in
  Sec. 6 of "Going Deeper with Convolutions" by Google.
  This implementation follows the details in ``fb.resnet.torch``.
  
  It attempts to crop a random rectangle with 8%~100% area of the original image,
  and keep the aspect ratio between 3/4 to 4/3. Then it resize this crop to the target shape.
  If such crop cannot be found in 10 iterations, it will do a ResizeShortestEdge + CenterCrop.
class_docstr_tok: ["The","random","crop","and","resize","augmentation","proposed","in","Sec",".","6","of","``","Going","Deeper","with","Convolutions","''","by","Google",".","This","implementation","follows","the","details","in","``","fb.resnet.torch","``",".","It","attempts","to","crop","a","random","rectangle","with","8","%","~100","%","area","of","the","original","image",",","and","keep","the","aspect","ratio","between","3\/4","to","4\/3",".","Then","it","resize","this","crop","to","the","target","shape",".","If","such","crop","can","not","be","found","in","10","iterations",",","it","will","do","a","ResizeShortestEdge","+","CenterCrop","."]
code: def get_transform(self, img):
      h, w = img.shape[:2]
      area = h * w
      for _ in range(10):
          targetArea = self.rng.uniform(*self.crop_area_fraction) * area
          aspectR = self.rng.uniform(*self.aspect_ratio_range)
          ww = int(np.sqrt(targetArea * aspectR) + 0.5)
          hh = int(np.sqrt(targetArea / aspectR) + 0.5)
          if self.rng.uniform() < 0.5:
              ww, hh = hh, ww
          if hh <= h and ww <= w:
              x1 = self.rng.randint(0, w - ww + 1)
              y1 = self.rng.randint(0, h - hh + 1)
              return TransformList(
                  [
                      CropTransform(y1, x1, hh, ww),
                      ResizeTransform(
                          hh,
                          ww,
                          self.target_shape,
                          self.target_shape,
                          interp=self.interp,
                      ),
                  ]
              )
      resize = ResizeShortestEdge(
          self.target_shape, interp=self.interp
      ).get_transform(img)
      out_shape = (resize.new_h, resize.new_w)
      crop = CenterCrop(self.target_shape).get_transform(
          ImagePlaceholder(shape=out_shape)
      )
      return TransformList([resize, crop])
  
imports: import numpy
  import cv2
  from ...utils.argtools import shape2d
  from ...utils.develop import log_deprecated
  from .base import ImageAugmentor, ImagePlaceholder
  from .transform import CropTransform, TransformList, ResizeTransform, PhotometricTransform
  from .misc import ResizeShortestEdge
label_desc: Use image node_id 2 for calling the GoogleNetRandomCropAndResize obj's underlying member method code with example usage: obj.get_transform(img) and returns: TransformList, TransformList