class_docstr: Combination of transforms for training.
  Follow the style of https://github.com/open-mmlab/mmaction
      (1) short side keep aspect ratio resize
      (2) multiscale crop
      (3) scale
      (4) random horizontal flip
      (5) to tensor
      (6) normalize
class_docstr_tok: ["Combination","of","transforms","for","training",".","Follow","the","style","of","https",":","\/\/github.com\/open-mmlab\/mmaction","(","1",")","short","side","keep","aspect","ratio","resize","(","2",")","multiscale","crop","(","3",")","scale","(","4",")","random","horizontal","flip","(","5",")","to","tensor","(","6",")","normalize"]
code: def forward(self, clips):
      h, w, _ = clips[0].shape
  
      # step 1: short side keep aspect ratio resize
      new_w = self.short_side
      new_h = self.short_side
      if w < h:
          new_h = int(math.floor((float(h) / w) * self.short_side))
      else:
          new_w = int(math.floor((float(w) / h) * self.short_side))
  
      # step 2: multiscale crop
      crop_size_pairs = self.multiScaleCrop.fillCropSize(
          self.scale_ratios, self.max_distort, new_h, new_w
      )
      size_sel = random.choice(crop_size_pairs)
      crop_height = size_sel[0]
      crop_width = size_sel[1]
  
      is_flip = random.random() < self.prob
      if self.fix_crop:
          offsets = self.multiScaleCrop.fillFixOffset(
              self.more_fix_crop, new_h, new_w, crop_height, crop_width
          )
          off_sel = random.choice(offsets)
          h_off = off_sel[0]
          w_off = off_sel[1]
      else:
          h_off = random.randint(0, new_h - crop_height)
          w_off = random.randint(0, new_w - crop_width)
  
      new_clips = []
      for cur_img in clips:
          scale_img = self.cv2.resize(cur_img, (new_w, new_h))
          crop_img = scale_img[
              h_off : h_off + crop_height, w_off : w_off + crop_width, :
          ]
          resize_img = self.cv2.resize(
              crop_img, (self.width, self.height)
          )
          if is_flip:
              flip_img = np.flip(resize_img, axis=1)
          else:
              flip_img = resize_img
          tensor_img = (
              np.transpose(flip_img, axes=(2, 0, 1))
              / self.max_intensity
          )
          new_clips.append((tensor_img - self.mean) / self.std)
      return new_clips
  
imports: from __future__ import division
  import random
  import math
  import numbers
  import numpy
  from mxnet.gluon import Block
label_desc: Use image node_id 2 for calling the VideoGroupTrainTransformV2 obj's underlying member method code with example usage: obj.forward(clips) and returns: new_clips