  
      Sets backend tensorflow settings prior to launching the model.
  
      Tensorflow 2 uses distribution strategies for multi-GPU/system training. These are context
      managers. To enable the code to be more readable, we handle strategies the same way for Nvidia
      and AMD backends. PlaidML does not support strategies, but we need to still create a context
      manager so that we don't need branching logic.
  
      Parameters
      ----------
      arguments: :class:`argparse.Namespace`
          The arguments that were passed to the train or convert process as generated from
 
</s> remove         It is important to note that any models and sub-models should not call
        :class:`keras.models.Model` directly, but rather call
        :class:`plugins.train.model._base.KerasModel`. This acts as a wrapper for Keras' Model
        class, but handles some minor differences which need to be handled between Nvidia and AMD
        backends.

 </s> add  </s> remove     def __init__(self, in_queue: "EventQueue", queue_size: int, arguments: "Namespace") -> None:
 </s> add     def __init__(self, in_queue: EventQueue, queue_size: int, arguments: Namespace) -> None: </s> remove     def __init__(self, arguments: "Namespace") -> None:
 </s> add     def __init__(self, arguments: Namespace) -> None: </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]: </s> remove         this is a straight call to the predict function. For PlaidML backends, this attempts
        to optimize the inference batch sizes to reduce the number of kernels that need to be
        compiled.
 </s> add         this is a straight call to the predict function.
    managers.
  
      Sets backend tensorflow settings prior to launching the model.
  
      Tensorflow 2 uses distribution strategies for multi-GPU/system training. These are context
    managers.
    managers.
    managers.
  
      Parameters
      ----------
      arguments: :class:`argparse.Namespace`
          The arguments that were passed to the train or convert process as generated from
keep keep keep keep replace 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 
plugins/train/model/_base/settings.py