                  continue
              klayer: tf.keras.layers.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
          if self.config["mask_type"] is None:
 
</s> remove             old_model: tf.keras.models.Model = load_model(os.path.join(archive_dir, model_name),
                                                          compile=False)
 </s> add             old_model: tf.keras.models.Model = keras.models.load_model(
                os.path.join(archive_dir, model_name),
                compile=False) </s> remove             output = get_folder(os.path.join(str(self._model.model_dir),
 </s> add             output = get_folder(os.path.join(str(self._model.io.model_dir), </s> remove                 if self._command == "train" and output.startswith("Reading training images"):
                    print(output.strip(), file=sys.stdout)
 </s> add                 if self._process_training_determinate_function(output): </s> remove         if not all(os.path.isfile(os.path.join(self.model_dir, fname))
 </s> add         if not all(os.path.isfile(os.path.join(self.io.model_dir, fname)) </s> remove                 model = self._io._load()  # pylint:disable=protected-access
 </s> add                 model = self.io.load()
        filename = self._io.filename
                  continue
              klayer: tf.keras.layers.Layer = layer[0]
              logger.info("Updating legacy weights from '%s'...", model_name)
              klayer.set_weights(old_model.get_weights())
        filename = self._io.filename
          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
          if self.config["mask_type"] is None:
keep keep keep keep replace keep keep keep keep keep
 Learning Rate finder (#1341)

* Add LR Finder support structure

* Move trainer.Feeder to lib.training.generator

* Expose model.io

* Add lr_finder

* Update docs and locales

* Pre-PR fixups
  - Fix training graph not displaying
  - CI fixes
  - Switch lr finder progress to tqdm
  - Exit lr finder early on NaN
  - Display lr finder progress in GUI 
plugins/train/model/_base/model.py