          self._training_size = training_size
          coverage = int(self._training_size * self._coverage_ratio // 2) * 2
  
          # Color Aug
          clahe_base_contrast = training_size // 128
          # Target Images
          tgt_slices = slice(self._training_size // 2 - coverage // 2,
                             self._training_size // 2 + coverage // 2)
  
          # Random Warp
          warp_range_ = np.linspace(self._training_size // 2 - coverage // 2,
                                    self._training_size // 2 + coverage // 2, 5, dtype='float32')
          warp_mapx = np.broadcast_to(warp_range_, (self._batchsize, 5, 5)).astype("float32")
 
</s> remove         warp_range_ = np.linspace(self._training_size // 2 - coverage // 2,
                                  self._training_size // 2 + coverage // 2, 5, dtype='float32')
        warp_mapx = np.broadcast_to(warp_range_, (self._batchsize, 5, 5)).astype("float32")
 </s> add         warp_range = np.linspace(0, self._processing_size, 5, dtype='float32')
        warp_mapx = np.broadcast_to(warp_range, (self._batchsize, 5, 5)).astype("float32") </s> remove 
        warp_pad = int(1.25 * self._input_size)
        warp_slices = slice(warp_pad // 10, -warp_pad // 10)
 </s> add         warp_pad = int(1.25 * self._processing_size) </s> remove         Parameters
        ----------
        training_size: int
             The size of the training images stored on disk that are to be fed into
             :class:`ImageAugmentation`. The training images should always be square and of the
             same size. This is the size, in pixels, of the `width` and the `height` of the
             training images.
         """
        logger.debug("Initializing constants. training_size: %s", training_size)
        self._training_size = training_size
        coverage = int(self._training_size * self._coverage_ratio // 2) * 2
 </s> add         # Transform
        tform_shift = (int(self._config.get("shift_range", 5)) / 100) * self._processing_size </s> remove         tform = np.random.uniform(
            -shift_range,
            shift_range,
            size=(self._batchsize, 2)).astype("float32") * self._training_size
 </s> add  </s> remove         p_mx = self._training_size - 1
        p_hf = (self._training_size // 2) - 1
 </s> add         p_mx = self._processing_size - 1
        p_hf = (self._processing_size // 2) - 1
        amount_l = int(self._config.get("color_lightness", 30)) / 100
        amount_ab = int(self._config.get("color_ab", 8)) / 100
        lab_adjust = np.array([amount_l, amount_ab, amount_ab], dtype="float32")
          self._training_size = training_size
          coverage = int(self._training_size * self._coverage_ratio // 2) * 2
  
          # Color Aug
        amount_l = int(self._config.get("color_lightness", 30)) / 100
        amount_ab = int(self._config.get("color_ab", 8)) / 100
        lab_adjust = np.array([amount_l, amount_ab, amount_ab], dtype="float32")
        amount_l = int(self._config.get("color_lightness", 30)) / 100
        amount_ab = int(self._config.get("color_ab", 8)) / 100
        lab_adjust = np.array([amount_l, amount_ab, amount_ab], dtype="float32")
        amount_l = int(self._config.get("color_lightness", 30)) / 100
        amount_ab = int(self._config.get("color_ab", 8)) / 100
        lab_adjust = np.array([amount_l, amount_ab, amount_ab], dtype="float32")
        amount_l = int(self._config.get("color_lightness", 30)) / 100
        amount_ab = int(self._config.get("color_ab", 8)) / 100
        lab_adjust = np.array([amount_l, amount_ab, amount_ab], dtype="float32")
  
          # Random Warp
          warp_range_ = np.linspace(self._training_size // 2 - coverage // 2,
                                    self._training_size // 2 + coverage // 2, 5, dtype='float32')
          warp_mapx = np.broadcast_to(warp_range_, (self._batchsize, 5, 5)).astype("float32")
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Data Augmentation update (#1263)

- lib.detected_face
    - Subclass Masks for Landmark based masks
    - Add training mask propery + methods to DetectedFace
  - lib.training_training
    - subclass TrainingDataGenerator for training and preview data
    - Split cache into own module
    - Reduce thread count to 1 to prevent image corruption + data re-use
    - Process on largest model input/output size rather than stored image size
    - Size and crop masks during caching stage
    - Implement ring buffer for data flow
    - Fix preview reload bug
  - augmentation
    - typing
    - switch color aug order
    - better initialization
    - Fix warp + landmark warp to correctly apply at different image scales
    - Slightly improved warp caching
    - Don't store whether image is_preview. Handle all data as training images implicitly
  - plugins.trainer: Typing and fixes to work with trainingdata refactor 
lib/training/augmentation.py