          """ Train a batch """
          logger.trace("Training one step: (side: %s)", self.side)
          model_inputs, model_targets = self.get_next()
          try:
              loss = self.model.predictors[self.side].train_on_batch(x=model_inputs, y=model_targets)
          except tf_errors.ResourceExhaustedError as err:
              msg = ("You do not have enough GPU memory available to train the selected model at "
                     "the selected settings. You can try a number of things:"
                     "\n1) Close any other application that is using your GPU (web browsers are "
                     "particularly bad for this)."
 
</s> remove         model_inputs, model_targets = self.get_next()
 </s> add         batch = self.get_next(do_preview) </s> remove     def train_one_batch(self):
 </s> add     def train_one_batch(self, do_preview): </s> remove                    "\nIf you are using 'warp to landmarks' then every "
 </s> add                    "\nIf you are training with a mask or using 'warp to landmarks' then every " </s> remove             section=section, title="replicate_input_mask", datatype=bool,
            default=False, group="mask",
            info="Dedicate portions of the model to learning how to duplicate the input "
                 "mask. Increases VRAM usage in exchange for a learning a quick ability "
                 "to try to replicate more complex mask models.")
 </s> add             section=section, title="mask_type", datatype=str, default="none",
            choices=get_available_masks(), group="mask",
            info="The mask to be used for training:"
                 "\n\t none: Doesn't use any mask."
                 "\n\t components: An improved face hull mask using a facehull of 8 facial parts"
                 "\n\t dfl_full: An improved face hull mask using a facehull of 3 facial parts"
                 "\n\t extended: Based on components mask. Extends the eyebrow points to further "
                 "up the forehead. May perform badly on difficult angles."
                 "\n\t facehull: Face cutout based on landmarks")
            loss = self.model.predictors[self.side].train_on_batch(*batch)
          """ Train a batch """
          logger.trace("Training one step: (side: %s)", self.side)
          model_inputs, model_targets = self.get_next()
          try:
            loss = self.model.predictors[self.side].train_on_batch(*batch)
          except tf_errors.ResourceExhaustedError as err:
              msg = ("You do not have enough GPU memory available to train the selected model at "
                     "the selected settings. You can try a number of things:"
                     "\n1) Close any other application that is using your GPU (web browsers are "
                     "particularly bad for this)."
keep keep keep keep replace keep keep keep keep keep
 Serialize masks to alignments file

- Add new serializers (npy + compressed)
- Remove Serializer option from cli
- Revert get_aligned call in scripts/extract
- Default alignments to compressed
- Size masks to 128px and compress
- Remove mask thresholding/blur from generation code
- Add Mask class to lib/faces_detect
- Revert debug landmarks to aligned face
- Revert non-extraction code to staging version 
plugins/train/trainer/_base.py