class_docstr: Video Augmentation for batched video input: input_signal shape (B, C, T, H, W) 
class_docstr_tok: ["Video","Augmentation","for","batched","video","input",":","input_signal","shape","(","B",",","C",",","T",",","H",",","W",")"]
code: def __init__(
      self,
      random_crop,
      crop_size,
      horizontal_flip,
      time_masking,
      num_mask_second=1.0,
      spatial_masking=False,
      mean_frame=True,
  ):
      super().__init__()
  
      # Params
      self.random_crop = random_crop
      self.crop_size = crop_size
      self.horizontal_flip = horizontal_flip
      self.time_masking = time_masking
      self.spatial_masking = spatial_masking
  
      self.training_augments = nn.ModuleList()
      self.inference_augments = nn.ModuleList()
  
      # Random Crop
      if self.random_crop:
          if TORCHVISION_AVAILABLE:
              self.training_augments.append(
                  torchvision.transforms.RandomCrop(self.crop_size)
              )
              self.inference_augments.append(
                  torchvision.transforms.CenterCrop(self.crop_size)
              )
          else:
              raise Exception(
                  "RandomCrop transform requires torchvision"
              )
  
      # Horizontal Flip
      if self.horizontal_flip:
          if TORCHVISION_AVAILABLE:
              self.training_augments.append(
                  torchvision.transforms.RandomHorizontalFlip()
              )
          else:
              raise Exception(
                  "RandomHorizontalFlip transform requires torchvision"
              )
  
      # Time Masking
      if self.time_masking:
          self.training_augments.append(
              VideoFrameMasking(
                  num_mask_second=num_mask_second, mean_frame=mean_frame
              )
          )
  
      # Spatial Masking
      if self.spatial_masking:
          self.training_augments.append(
              SpatialVideoMasking(mean_frame=mean_frame)
          )
  
file_path: NeMo/nemo/collections/multimodal/speech_cv/modules/video_augment.py
imports: import random
  from collections import OrderedDict
  import torch
  from torch import nn
  from nemo.core.classes.module import NeuralModule
  from nemo.core.neural_types import NeuralType, VideoSignal
label_desc: Use image node_id 1 to create a new VideoAugmentation object from inherited base classes: NeuralModule with example: obj = VideoAugmentation(random_crop, crop_size, horizontal_flip, time_masking, num_mask_second, spatial_masking, mean_frame)