              set_backend("cpu")
              logger.info(msg)
  
          logger.debug("Executing: %s. PID: %s", self._command, os.getpid())
  
          if get_backend() == "amd" and not self._setup_amd(arguments):
              safe_shutdown(got_error=True)
  
      @classmethod
      def _setup_amd(cls, arguments: "argparse.Namespace") -> bool:
          """ Test for plaidml and perform setup for AMD.
  
          Parameters
          ----------
          arguments: :class:`argparse.Namespace`
              The command line arguments passed to Faceswap.
  
          Returns
          -------
          bool
              ``True`` if AMD was set up succesfully otherwise ``False``
          """
          logger.debug("Setting up for AMD")
          if platform.system() == "Windows":
              deprecation_warning("The AMD backend",
                                  additional_info="Please consider re-installing using the "
                                                  "'DirectML' backend")
          try:
              import plaidml  # noqa pylint:disable=unused-import,import-outside-toplevel
          except ImportError:
              logger.error("PlaidML not found. Run `pip install plaidml-keras` for AMD support")
              return False
          from lib.gpu_stats import setup_plaidml  # pylint:disable=import-outside-toplevel
          setup_plaidml(arguments.loglevel, arguments.exclude_gpus)
          logger.debug("setup up for PlaidML")
          return True
 
</s> remove         if get_backend() == "amd":
            logger.debug("No action to perform for 'mixed_precision' on backend '%s': "
                         "use_mixed_precision: %s)", get_backend(), use_mixed_precision)
            return False

 </s> add  </s> remove 
        Notes
        -----
        Clip-norm is ballooning VRAM usage, which is not expected behavior and may be a bug in
        Keras/Tensorflow.

        PlaidML has a bug regarding the clip-norm parameter See:
        https://github.com/plaidml/plaidml/issues/228. We workaround by simply not adding this
        parameter for AMD backend users.
 </s> add  </s> remove     def __init__(self, arguments: "argparse.Namespace") -> None:
 </s> add     def __init__(self, arguments: argparse.Namespace) -> None: </s> remove     def __init__(self, arguments: "Namespace") -> None:
 </s> add     def __init__(self, arguments: Namespace) -> None: </s> remove     def __init__(self, arguments: "argparse.Namespace") -> None:
 </s> add     def __init__(self, arguments: argparse.Namespace) -> None:
              set_backend("cpu")
              logger.info(msg)
  
          logger.debug("Executing: %s. PID: %s", self._command, os.getpid())
































keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace
 Remove plaidML support (#1325)

* Remove PlaidML reference from readme files

* Remove AMD option from installers

* remove amd requirements and update setup.py

* remove plaidml test from CI workflow

* gpustats: remove plaidml backend

* plaid removals:
  - faceswap.py - python version check
  - setup.cfg - plaidml typing ignore
  - lib.keras_utils - All plaid code
  - lib.launcher.py - All plaidml checks and configuration

* remove tf2.2 specific code from GUI event reader

* lib.model - remove all plaidml implementations

* plugins.extract - remove plaidml code

* plugins.train remove plaidml code

* lib.convert - remove plaidml code

* tools.model: remove plaidml code

* Remove plaidML tests from unit tests

* remove plaidml_utils and docsting cleanups

* Remove plaidML refs from configs

* fix keras imports 
lib/cli/launcher.py