                  logger.warning("Skipping legacy weights from '%s'...", model_name)
                  continue
              layer = layer[0]
              logger.info("Updating legacy weights from '%s'...", model_name)
              layer.set_weights(old_model.get_weights())
          filename = self._io._filename  # pylint:disable=protected-access
          logger.info("Saving Tensorflow 2.x model to '%s'", filename)
          new_model.save(filename)
          # Penalized Loss and Learn Mask used to be disabled automatically if a mask wasn't
          # selected, so disable it if enabled, but mask_type is None
 
</s> remove             layer = layer[0]
 </s> add             klayer: keras.layers.Layer = layer[0] </s> remove             old_model = load_model(os.path.join(archive_dir, model_name), compile=False)
 </s> add             old_model: keras.models.Model = load_model(os.path.join(archive_dir, model_name),
                                                       compile=False) </s> remove         new_config = dict()
 </s> add         new_config = {} </s> remove         for idx, model in enumerate(get_all_sub_models(self._model)):
 </s> add         for idx, model in enumerate(get_all_sub_models(self.model)): </s> remove         if len(self._model.output_names) == len(set(self._model.output_names)):
            logger.debug("Output names are unique, not rewriting: %s", self._model.output_names)
 </s> add         if len(self.model.output_names) == len(set(self.model.output_names)):
            logger.debug("Output names are unique, not rewriting: %s", self.model.output_names)
            klayer.set_weights(old_model.get_weights())
                  logger.warning("Skipping legacy weights from '%s'...", model_name)
                  continue
              layer = layer[0]
              logger.info("Updating legacy weights from '%s'...", model_name)
            klayer.set_weights(old_model.get_weights())
          filename = self._io._filename  # pylint:disable=protected-access
          logger.info("Saving Tensorflow 2.x model to '%s'", filename)
          new_model.save(filename)
          # Penalized Loss and Learn Mask used to be disabled automatically if a mask wasn't
          # selected, so disable it if enabled, but mask_type is None
keep keep keep keep replace keep keep keep keep keep
 Core updates
   - Change loss loading mechanism
   - Autosize tooltips based on content size
   - Random linting + code modernisation 
plugins/train/model/_base/model.py