  from lib.utils import get_backend, get_tf_version, FaceswapError
  from plugins.train._config import Config
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  _CONFIG = None
  
  
  def KerasModel(inputs, outputs, name):  # pylint:disable=invalid-name
 
</s> remove from lib.utils import (FaceswapError, get_backend, get_tf_version, KerasFinder, safe_shutdown,
 </s> add from lib.utils import (FaceswapError, get_backend, get_tf_version, safe_shutdown, </s> remove _CONFIG = dict()
_NAMES = dict()
 </s> add _CONFIG = {}
_NAMES = {} </s> remove from keras import backend as K
from keras import initializers
 </s> add  </s> remove logger = logging.getLogger(__name__)  # pylint:disable=invalid-name
 </s> add logger = logging.getLogger(__name__) </s> remove from lib.utils import get_backend, get_keras_custom_objects as get_custom_objects
 </s> add from lib.utils import get_backend

if get_backend() == "amd":
    from keras.utils import get_custom_objects  # pylint:disable=no-name-in-module
    from keras import backend as K
    from keras import initializers
else:
    # Ignore linting errors from Tensorflow's thoroughly broken import system
    from tensorflow.keras.utils import get_custom_objects  # noqa pylint:disable=no-name-in-module,import-error
    from tensorflow.keras import initializers, backend as K  # noqa pylint:disable=no-name-in-module,import-error
if get_backend() == "amd":
    from keras import losses as k_losses
    from keras import backend as K
    from keras.layers import Input
    from keras.models import load_model, Model as KModel
else:
    # Ignore linting errors from Tensorflow's thoroughly broken import system
    from tensorflow.keras import losses as k_losses  # pylint:disable=import-error
    from tensorflow.keras import backend as K  # pylint:disable=import-error
    from tensorflow.keras.layers import Input  # pylint:disable=import-error,no-name-in-module
    from tensorflow.keras.models import load_model, Model as KModel  # noqa pylint:disable=import-error,no-name-in-module


  from lib.utils import get_backend, get_tf_version, FaceswapError
  from plugins.train._config import Config
  
if get_backend() == "amd":
    from keras import losses as k_losses
    from keras import backend as K
    from keras.layers import Input
    from keras.models import load_model, Model as KModel
else:
    # Ignore linting errors from Tensorflow's thoroughly broken import system
    from tensorflow.keras import losses as k_losses  # pylint:disable=import-error
    from tensorflow.keras import backend as K  # pylint:disable=import-error
    from tensorflow.keras.layers import Input  # pylint:disable=import-error,no-name-in-module
    from tensorflow.keras.models import load_model, Model as KModel  # noqa pylint:disable=import-error,no-name-in-module


  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  _CONFIG = None
  
  
  def KerasModel(inputs, outputs, name):  # pylint:disable=invalid-name
keep keep add keep keep keep keep keep
 Update all Keras Imports to be conditional (#1214)

* Remove custom keras importer

* first round keras imports fix

* launcher.py: Remove KerasFinder references

* 2nd round keras imports update (lib and extract)

* 3rd round keras imports update (train)

* remove KerasFinder from tests

* 4th round keras imports update (tests) 
plugins/train/model/_base.py