  
  import numpy as np
  import tensorflow as tf
  
  # Ignore linting errors from Tensorflow's thoroughly broken import system
  from tensorflow.keras import backend as K  # pylint:disable=import-error
  from tensorflow.keras.layers import Input  # pylint:disable=import-error
  from tensorflow.keras.models import load_model, Model as KModel  # noqa:E501  # pylint:disable=import-error
  
  from lib.serializer import get_serializer
  from lib.model.nn_blocks import set_config as set_nnblock_config
  from lib.utils import FaceswapError
  from plugins.train._config import Config
  
 
</s> remove from lib.training import PreviewDataGenerator, TrainingDataGenerator
from lib.training.generator import BatchType, DataGenerator
 </s> add from lib.training import Feeder, LearningRateFinder </s> remove     from collections.abc import Callable, Generator
 </s> add     from collections.abc import Callable </s> remove from .generator import PreviewDataGenerator, TrainingDataGenerator
 </s> add from .generator import Feeder
from .lr_finder import LearningRateFinder
  
  import numpy as np
  import tensorflow as tf
  





  from lib.serializer import get_serializer
  from lib.model.nn_blocks import set_config as set_nnblock_config
  from lib.utils import FaceswapError
  from plugins.train._config import Config
  
keep keep keep keep replace replace replace replace 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