                          step=self._tensorboard._train_step)  # pylint:disable=protected-access
          else:
              self._tensorboard.on_train_batch_end(self._model.iterations, logs=logs)
  
      def _collate_and_store_loss(self, loss):
          """ Collate the loss into totals for each side.
  
          The losses are summed into a total for each side. Loss totals are added to
          :attr:`model.state._history` to track the loss drop per save iteration for backup purposes.
  
 
</s> remove             The list of loss ``floats`` for this iteration.
 </s> add             The list of loss ``floats`` for each side this iteration (excluding total combined
            loss) </s> remove     def _compile_mask_targets(self, targets, masks, additional_masks):
        """ Compile the masks into the targets for penalized loss and for targeted learning.
 </s> add         return model_inputs, model_targets </s> remove         Penalized loss expects the target mask to be included for all outputs in the 4th channel
        of the targets. Any additional masks are placed into subsequent channels for extraction
        by the relevant loss functions.
 </s> add     def generate_preview(self,
                         is_timelapse: bool = False) -> Dict[Literal["a", "b"], List[np.ndarray]]:
        """ Generate the images for preview window or timelapse </s> remove             List of 2 ``floats`` which is the total loss for each side
 </s> add             List of 2 ``floats`` which is the total loss for each side (eg sum of face + mask loss) </s> remove         headers: :class:`numpy.ndarray`
            The header to be duplicated
 </s> add         headers: dict
            The headers to be duplicated for each side
    def _collate_and_store_loss(self, loss: List[float]) -> List[float]:
                          step=self._tensorboard._train_step)  # pylint:disable=protected-access
          else:
              self._tensorboard.on_train_batch_end(self._model.iterations, logs=logs)
  
    def _collate_and_store_loss(self, loss: List[float]) -> List[float]:
          """ Collate the loss into totals for each side.
  
          The losses are summed into a total for each side. Loss totals are added to
          :attr:`model.state._history` to track the loss drop per save iteration for backup purposes.
  
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