              "Train lightweight model for 1 iterations WITHOUT WTL, AutoClip, MixedPrecion",
              train_args("lightweight",
                         pathjoin(vid_base, "model"),
                         pathjoin(vid_base, "faces"),
                         iterations=_TRAIN_ARGS[0],
                         batchsize=_TRAIN_ARGS[1],
                         extra_args="-wl"))
  
      if was_trained:
          run_test(
              "Convert video.",
 
</s> remove                        iterations=_TRAIN_ARGS[0],
                       batchsize=_TRAIN_ARGS[1],
 </s> add                        iterations=1,
                       batchsize=1, </s> remove     def add_mixed_precision_layers(self, layers: List[str]) -> None:
 </s> add     def add_mixed_precision_layers(self, layers: T.List[str]) -> None: </s> remove         except Exception as err:
            if get_backend() == "amd":
                # pylint:disable=import-outside-toplevel
                from lib.plaidml_utils import is_plaidml_error
                if (is_plaidml_error(err) and (
                        "CL_MEM_OBJECT_ALLOCATION_FAILURE" in str(err).upper() or
                        "enough memory for the current schedule" in str(err).lower())):
                    msg = ("You do not have enough GPU memory available to train the selected "
                           "model at the selected settings. You can try a number of things:"
                           "\n1) Close any other application that is using your GPU (web browsers "
                           "are particularly bad for this)."
                           "\n2) Lower the batchsize (the amount of images fed into the model "
                           "each iteration)."
                           "\n3) Use a more lightweight model, or select the model's 'LowMem' "
                           "option (in config) if it has one.")
                    raise FaceswapError(msg) from err
            raise
 </s> add  </s> remove         if get_backend() == "amd":  # Expand out AMD inputs + targets
            model_inputs = [inp for side in model_inputs for inp in side]  # type: ignore
            model_targets = [tgt for side in model_targets for tgt in side]  # type: ignore
 </s> add  </s> remove     def _rewrite_plaid_outputs(self) -> None:
        """ Rewrite the output names for models using the PlaidML (Keras 2.2.4) backend

        Keras 2.2.4 duplicates model output names if any of the models have multiple outputs
        so we need to rename the outputs so we can successfully map the loss dictionaries.

        This is a bit of a hack, but it does work.
        """
        # TODO Remove this rewrite code if PlaidML updates to a version of Keras where this is
        # no longer necessary
        if len(self.model.output_names) == len(set(self.model.output_names)):
            logger.debug("Output names are unique, not rewriting: %s", self.model.output_names)
            return
        seen = {name: 0 for name in set(self.model.output_names)}
        new_names = []
        for name in self.model.output_names:
            new_names.append(f"{name}_{seen[name]}")
            seen[name] += 1
        logger.debug("Output names rewritten: (old: %s, new: %s)",
                     self.model.output_names, new_names)
        self.model.output_names = new_names

    def _legacy_mapping(self) -> Optional[dict]:
 </s> add     def _legacy_mapping(self) -> T.Optional[dict]:
                       iterations=1,
                       batchsize=1,
              "Train lightweight model for 1 iterations WITHOUT WTL, AutoClip, MixedPrecion",
              train_args("lightweight",
                         pathjoin(vid_base, "model"),
                         pathjoin(vid_base, "faces"),
                       iterations=1,
                       batchsize=1,
                       iterations=1,
                       batchsize=1,
                         extra_args="-wl"))
  
      if was_trained:
          run_test(
              "Convert video.",
keep keep keep keep replace 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 
tests/simple_tests.py