  
  
  class Loss():
      """ Holds loss names and functions for an Autoencoder """
      def __init__(self, side, outputs, mask_input, predict):
          logger.debug("Initializing %s: (side: '%s', outputs: '%s', mask_input: '%s', predict: %s",
                       self.__class__.__name__, side, outputs, mask_input, predict)
          self.outputs = outputs
          self.names = self.get_loss_names()
          self.funcs = self.get_loss_functions(side, predict, mask_input)
          if len(self.names) > 1:
              self.names.insert(0, "total_loss")
 
</s> remove         self.funcs = self.get_loss_functions(side, predict, mask_input)
 </s> add         self.funcs = self.get_loss_functions(mask_input) </s> remove     def get_loss_functions(self, side, predict, mask):
 </s> add     def get_loss_functions(self, mask): </s> remove             loss = Loss(side, model.outputs, mask_input, self.predict)
 </s> add             loss = Loss(model.outputs, mask_input) </s> remove 
    def update_legacy_config(self):
        """ Update legacy state config files with the new loss formating
        """
        prior = "dssim_loss"
        new = "loss_function"
        if prior in self.config.keys() and new not in self.config.keys():
            self.config[new] = "ssim" if self.config[prior] is True else "mae"
            logger.debug("Updated config from older dssim format. New config loss function: %s",
                         self.config[new])
 </s> add 
    def __init__(self, outputs, mask_input):
        logger.debug("Initializing %s: (outputs: '%s', mask_input: '%s')",
                     self.__class__.__name__, outputs, mask_input)
  
  
  class Loss():
      """ Holds loss names and functions for an Autoencoder """
    def __init__(self, outputs, mask_input):
        logger.debug("Initializing %s: (outputs: '%s', mask_input: '%s')",
                     self.__class__.__name__, outputs, mask_input)
    def __init__(self, outputs, mask_input):
        logger.debug("Initializing %s: (outputs: '%s', mask_input: '%s')",
                     self.__class__.__name__, outputs, mask_input)
    def __init__(self, outputs, mask_input):
        logger.debug("Initializing %s: (outputs: '%s', mask_input: '%s')",
                     self.__class__.__name__, outputs, mask_input)
          self.outputs = outputs
          self.names = self.get_loss_names()
          self.funcs = self.get_loss_functions(side, predict, mask_input)
          if len(self.names) > 1:
              self.names.insert(0, "total_loss")
keep keep keep keep replace replace replace keep keep keep keep keep
 Post PR Fixups

- train/_config.py: PEP8 Fixes. Slight description change on coverage
- models/_base.py:
   - Remove unused variables from Loss()
   - Delete legacy config items from state file
   - Save state file on Legacy update
   - PEP8
- Remove _defaults.py for models with no config options 
plugins/train/model/_base.py