          self._set_loss_names(model.outputs)
          self._set_loss_functions(model.output_names)
          self._names.insert(0, "total")
  
      def _set_loss_names(self, outputs: List[tf.Tensor]) -> None:
          """ Name the losses based on model output.
  
          This is used for correct naming in the state file, for display purposes only.
  
          Adds the loss names to :attr:`names`
 
</s> remove     def _mask_inputs(self) -> Optional[list]:
 </s> add     def _mask_inputs(self) -> T.Optional[list]: </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         datatype:  [required] A python type class. This limits the type of data that can be
                   provided in the .ini file and ensures that the value is returned in the
                   correct type to faceswap. Valid data types are: <class 'int'>, <class 'float'>,
                   <class 'str'>, <class 'bool'>.
        default:   [required] The default value for this option.
        info:      [required] A string describing what this option does.
        choices:   [optional] If this option's datatype is of <class 'str'> then valid
                   selections can be defined here. This validates the option and also enables
                   a combobox / radio option in the GUI.
        gui_radio: [optional] If <choices> are defined, this indicates that the GUI should use
                   radio buttons rather than a combobox to display this option.
        min_max:   [partial] For <class 'int'> and <class 'float'> data types this is required
                   otherwise it is ignored. Should be a tuple of min and max accepted values.
                   This is used for controlling the GUI slider range. Values are not enforced.
        rounding:  [partial] For <class 'int'> and <class 'float'> data types this is
                   required otherwise it is ignored. Used for the GUI slider. For floats, this
                   is the number of decimal places to display. For ints this is the step size.
        fixed:     [optional] [train only]. Training configurations are fixed when the model is
                   created, and then reloaded from the state file. Marking an item as fixed=False
                   indicates that this value can be changed for existing models, and will override
                   the value saved in the state file with the updated value in config. If not
                   provided this will default to True.
 </s> add         "datatype:  [required] A python type class. This limits the type of data that can be
               "   provided in the .ini file and ensures that the value is returned in the
               "   correct type to faceswap. Valid data types are: <class 'int'>, <class 'float'>,
               "   <class 'str'>, <class 'bool'>.
        "default:   [required] The default value for this option.
        "info:      [required] A string describing what this option does.
        "choices:   [optional] If this option's datatype is of <class 'str'> then valid
               "   selections can be defined here. This validates the option and also enables
               "   a combobox / radio option in the GUI.
        "gui_radio: [optional] If <choices> are defined, this indicates that the GUI should use
               "   radio buttons rather than a combobox to display this option.
        "min_max:   [partial] For <class 'int'> and <class 'float'> data types this is required
               "   otherwise it is ignored. Should be a tuple of min and max accepted values.
               "   This is used for controlling the GUI slider range. Values are not enforced.
        "rounding:  [partial] For <class 'int'> and <class 'float'> data types this is
               "   required otherwise it is ignored. Used for the GUI slider. For floats, this
               "   is the number of decimal places to display. For ints this is the step size.
        "fixed:     [optional] [train only]. Training configurations are fixed when the model is
               "   created, and then reloaded from the state file. Marking an item as fixed=False
               "   indicates that this value can be changed for existing models, and will override
               "   the value saved in the state file with the updated value in config. If not
               "   provided this will default to True. </s> remove         self._sessions[self._session_id] = dict(timestamp=time.time(),
                                                no_logs=no_logs,
                                                loss_names=[],
                                                batchsize=0,
                                                iterations=0,
                                                config=config_changeable_items)

    def add_session_loss_names(self, loss_names: List[str]) -> None:
 </s> add         self._sessions[self._session_id] = {"timestamp": time.time(),
                                            "no_logs": no_logs,
                                            "loss_names": [],
                                            "batchsize": 0,
                                            "iterations": 0,
                                            "config": config_changeable_items}

    def add_session_loss_names(self, loss_names: T.List[str]) -> None: </s> remove         if get_backend() == "amd":  # Mixed precision not supported on amd
            return model

 </s> add 
    def _set_loss_names(self, outputs: T.List[tf.Tensor]) -> None:
          self._set_loss_names(model.outputs)
          self._set_loss_functions(model.output_names)
          self._names.insert(0, "total")
  
    def _set_loss_names(self, outputs: T.List[tf.Tensor]) -> None:
          """ Name the losses based on model output.
  
          This is used for correct naming in the state file, for display purposes only.
  
          Adds the loss names to :attr:`names`
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 
plugins/train/model/_base/settings.py