                               key, val, new_val)
                  config[key] = new_val
          return config
  
      def _set_tensorboard(self):
          """ Set up Tensorboard callback for logging loss.
  
          Bypassed if command line option "no-logs" has been selected.
  
          Returns
 
</s> remove             logger.verbose("TensorBoard logging disabled")
 </s> add             logger.verbose("TensorBoard logging disabled")  # type: ignore </s> remove     def cache_full(self):
        """bool: ``True`` if the cache has been fully populated. ``False`` if there are items still
        to be cached. """
        if self._cache_full:
            return self._cache_full
        with self._lock:
            return self._cache_full

    @property
    def partially_loaded(self):
        """ bool: ``True`` if the cache has been partially loaded for Warp To Landmarks otherwise
        ``False`` """
        if self._partial_load:
            return self._partial_load
        with self._lock:
            return self._partial_load
 </s> add     def _total_channels(self) -> int:
        """int: The total number of channels, including mask channels that the target image
        should hold. """
        channels = 3
        if self._config["mask_type"] and (self._config["learn_mask"] or
                                          self._config["penalized_mask_loss"]):
            channels += 1

        mults = [area for area in ["eye", "mouth"] if int(self._config[f"{area}_multiplier"]) > 1]
        if self._config["penalized_mask_loss"] and mults:
            channels += len(mults)
        return channels

    def minibatch_ab(self, do_shuffle: bool = True) -> Generator[BatchType, None, None]:
        """ A Background iterator to return augmented images, samples and targets. </s> remove         warped_batch = np.array([cv2.resize(image[slices, slices, :],
                                            (self._input_size, self._input_size),
                                            cv2.INTER_AREA)
                                 for image in warped_batch])
        logger.trace("Warped batch shape: %s", warped_batch.shape)
 </s> add         logger.trace("Warped batch shape: %s", warped_batch.shape)  # type: ignore </s> remove 
    def skip_warp(self, batch):
        """ Returns the images resized and cropped for feeding the model, if warping has been
        disabled.

        Parameters
        ----------
        batch: :class:`numpy.ndarray`
            The batch should be a 4-dimensional array of shape (`batchsize`, `height`, `width`,
            `3`) and in `BGR` format.

        Returns
        -------
        :class:`numpy.ndarray`
            The given batch cropped and resized for feeding the model
        """
        logger.trace("Compiling skip warp images: batch shape: %s", batch.shape)
        slices = self._constants["tgt_slices"]
        retval = np.array([cv2.resize(image[slices, slices, :],
                                      (self._input_size, self._input_size),
                                      cv2.INTER_AREA)
                           for image in batch], dtype='float32') / 255.
        logger.trace("feed batch shape: %s", retval.shape)
        return retval
 </s> add  </s> remove         output_index: int
            The output index from the model to get output shapes for
 </s> add         side: ["a", "b"]
            The side of the model to load the generator for
        is_display: bool
            ``True`` if the generator is for creating preview/time-lapse images. ``False`` if it is
            for creating training images
        batch_size: int, optional
            If ``None`` then the batch size selected in command line arguments is used, otherwise
            the batch size provided here is used.
        images: list, optional. Default: ``None``
            If provided then this will be used as the list of images for the generator. If ``None``
            then the training folder images for the side will be used. Default: ``None``
    def _set_tensorboard(self) -> tf.keras.callbacks.TensorBoard:
                               key, val, new_val)
                  config[key] = new_val
          return config
  
    def _set_tensorboard(self) -> tf.keras.callbacks.TensorBoard:
          """ Set up Tensorboard callback for logging loss.
  
          Bypassed if command line option "no-logs" has been selected.
  
          Returns
keep keep keep keep 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 
plugins/train/trainer/_base.py