              return
          legacy_update = self._update_legacy_config()
          # Add any new items to state config for legacy purposes where the new default may be
          # detrimental to an existing model.
          legacy_defaults: Dict[str, Union[str, int, bool]] = dict(centering="legacy",
                                                                   mask_loss_function="mse",
                                                                   l2_reg_term=100,
                                                                   optimizer="adam",
                                                                   mixed_precision=False)
          for key, val in _CONFIG.items():
              if key not in self._config.keys():
                  setting: "ConfigValueType" = legacy_defaults.get(key, val)
                  logger.info("Adding new config item to state file: '%s': '%s'", key, setting)
                  self._config[key] = setting
 
</s> remove                 setting: "ConfigValueType" = legacy_defaults.get(key, val)
 </s> add                 setting: ConfigValueType = legacy_defaults.get(key, val) </s> remove     def _model_kwargs(self) -> Dict[str, Dict[str, Union[str, bool]]]:
 </s> add     def _model_kwargs(self) -> T.Dict[str, T.Dict[str, T.Union[str, bool]]]: </s> remove             klayer: keras.layers.Layer = layer[0]
 </s> add             klayer: tf.keras.layers.Layer = layer[0] </s> remove         batch: List[ConvertItem] = []
 </s> add         batch: T.List[ConvertItem] = [] </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:
        legacy_defaults: T.Dict[str, T.Union[str, int, bool]] = {"centering": "legacy",
                                                                 "mask_loss_function": "mse",
                                                                 "l2_reg_term": 100,
                                                                 "optimizer": "adam",
                                                                 "mixed_precision": False}
              return
          legacy_update = self._update_legacy_config()
          # Add any new items to state config for legacy purposes where the new default may be
          # detrimental to an existing model.
        legacy_defaults: T.Dict[str, T.Union[str, int, bool]] = {"centering": "legacy",
                                                                 "mask_loss_function": "mse",
                                                                 "l2_reg_term": 100,
                                                                 "optimizer": "adam",
                                                                 "mixed_precision": False}
        legacy_defaults: T.Dict[str, T.Union[str, int, bool]] = {"centering": "legacy",
                                                                 "mask_loss_function": "mse",
                                                                 "l2_reg_term": 100,
                                                                 "optimizer": "adam",
                                                                 "mixed_precision": False}
        legacy_defaults: T.Dict[str, T.Union[str, int, bool]] = {"centering": "legacy",
                                                                 "mask_loss_function": "mse",
                                                                 "l2_reg_term": 100,
                                                                 "optimizer": "adam",
                                                                 "mixed_precision": False}
        legacy_defaults: T.Dict[str, T.Union[str, int, bool]] = {"centering": "legacy",
                                                                 "mask_loss_function": "mse",
                                                                 "l2_reg_term": 100,
                                                                 "optimizer": "adam",
                                                                 "mixed_precision": False}
        legacy_defaults: T.Dict[str, T.Union[str, int, bool]] = {"centering": "legacy",
                                                                 "mask_loss_function": "mse",
                                                                 "l2_reg_term": 100,
                                                                 "optimizer": "adam",
                                                                 "mixed_precision": False}
          for key, val in _CONFIG.items():
              if key not in self._config.keys():
                  setting: "ConfigValueType" = legacy_defaults.get(key, val)
                  logger.info("Adding new config item to state file: '%s': '%s'", key, setting)
                  self._config[key] = setting
keep keep keep keep replace replace 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/model.py