          ------
          FaceswapError
              If Tensorflow is not found, or is not between versions 2.4 and 2.9
          """
          amd_ver = (2, 2)
          directml_ver = rocm_ver = (2, 10)
          min_ver = (2, 7)
          max_ver = (2, 10)
          try:
              import tensorflow as tf  # noqa pylint:disable=import-outside-toplevel,unused-import
 
</s> remove     no_amd: bool = False
    tf_min: Tuple[int, int] = (2, 0)
    scaling: Tuple[int, int] = (0, 1)
 </s> add     tf_min: T.Tuple[int, int] = (2, 0)
    scaling: T.Tuple[int, int] = (0, 1) </s> remove             correct_ifft = lambda shape, s=[None]: np.fft.irfft(shape, s[0])  # noqa
 </s> add             correct_ifft = lambda shape, s=[None]: np.fft.irfft(shape, s[0])  # noqa:E501,E731 # pylint:disable=unnecessary-lambda-assignment </s> remove     def test__add_amd_loss_labels(self,
                                  event_parser_instance: _EventParser,
                                  mocker: pytest_mock.MockerFixture) -> None:
        """ Test _add_amd_loss_labels works correctly

        Parameters
        ----------
        event_parser_instance: :class:`lib.gui.analysis.event_reader._EventParser`
            The class instance to test
        mocker: :class:`pytest_mock.MockerFixture`
            Mocker for checking Session data
        """
        event_parse = event_parser_instance

        # Already collected
        assert not event_parse._cache._loss_labels
        event_parse._cache._loss_labels.extend(["label_a", "label_b"])
        event_parse._add_amd_loss_labels(1)
        assert not event_parse._loss_labels

        # New labels
        event_parse._cache._loss_labels = []
        mock_session = mocker.patch("lib.gui.analysis.Session")
        mock_session.get_loss_keys.return_value = ["label_c", "label_d"]
        assert not event_parse._cache._loss_labels
        event_parse._add_amd_loss_labels(1)
        assert event_parse._loss_labels == ["label_c", "label_d"]

 </s> add  </s> remove         if self.backend == "amd" and sys.version_info >= (3, 9):
            logger.error("The AMD version of Faceswap cannot be installed on versions of Python "
                         "higher than 3.8")
            sys.exit(1)
 </s> add  </s> remove from lib.utils import get_backend

if get_backend() == "amd":
    from lib.plaidml_utils import pad
    from keras.utils import get_custom_objects, conv_utils  # pylint:disable=no-name-in-module
    import keras.backend as K
    from keras.layers import InputSpec, Layer
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 backend as K  # pylint:disable=import-error
    from tensorflow.keras.layers import InputSpec, Layer  # noqa pylint:disable=no-name-in-module,import-error
    from tensorflow import pad  # type:ignore
    from tensorflow.python.keras.utils import conv_utils  # pylint:disable=no-name-in-module


class PixelShuffler(Layer):
 </s> add # Fix intellisense/linting for tf.keras' thoroughly broken import system
from tensorflow.python.keras.utils import conv_utils  # pylint:disable=no-name-in-module
keras = tf.keras
layers = keras.layers
K = keras.backend


class PixelShuffler(keras.layers.Layer):  # type:ignore[name-defined]
          ------
          FaceswapError
              If Tensorflow is not found, or is not between versions 2.4 and 2.9
          """

          directml_ver = rocm_ver = (2, 10)
          min_ver = (2, 7)
          max_ver = (2, 10)
          try:
              import tensorflow as tf  # noqa pylint:disable=import-outside-toplevel,unused-import
keep keep keep keep replace keep keep keep keep keep
 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