          if accept_all and arg_spec.varkw is not None:
              return True
          return (name in arg_spec.args or
                  name in arg_spec.kwonlyargs)
      else:
          signature = inspect.signature(func)
          parameter = signature.parameters.get(name)
          if parameter is None:
              if accept_all:
                  for param in signature.parameters.values():
                      if param.kind == inspect.Parameter.VAR_KEYWORD:
                          return True
              return False
          return (parameter.kind in (inspect.Parameter.POSITIONAL_OR_KEYWORD,
                                     inspect.Parameter.KEYWORD_ONLY))
 
</s> remove     if sys.version_info < (3,):
        arg_spec = inspect.getargspec(func)
        if accept_all and arg_spec.keywords is not None:
            return True
        return (name in arg_spec.args)
    elif sys.version_info < (3, 3):
 </s> add     if sys.version_info < (3, 3): </s> remove         if get_backend() == "amd":
            # We can't log the graph in Tensorboard logs for AMD so need to obtain from state file
            loss_keys = {int(sess_id): [name for name in session["loss_names"] if name != "total"]
                         for sess_id, session in self._state["sessions"].items()}
        else:
            assert self._tb_logs is not None
            loss_keys = {sess_id: list(logs.keys())
                         for sess_id, logs
                         in self._tb_logs.get_loss(session_id=session_id).items()}
 </s> add         assert self._tb_logs is not None
        loss_keys = {sess_id: list(logs.keys())
                     for sess_id, logs
                     in self._tb_logs.get_loss(session_id=session_id).items()} </s> remove 
        Notes
        -----
        Clip-norm is ballooning VRAM usage, which is not expected behavior and may be a bug in
        Keras/Tensorflow.

        PlaidML has a bug regarding the clip-norm parameter See:
        https://github.com/plaidml/plaidml/issues/228. We workaround by simply not adding this
        parameter for AMD backend users.
 </s> add  </s> remove             retval = (os.path.basename(prefix) == "envs")
 </s> add             retval = os.path.basename(prefix) == "envs" </s> remove     def _mask_shapes(self) -> Optional[List[tuple]]:
 </s> add     def _mask_shapes(self) -> T.Optional[T.List[tuple]]:
    signature = inspect.signature(func)
    parameter = signature.parameters.get(name)
    if parameter is None:
        if accept_all:
            for param in signature.parameters.values():
                if param.kind == inspect.Parameter.VAR_KEYWORD:
                    return True
        return False
    return (parameter.kind in (inspect.Parameter.POSITIONAL_OR_KEYWORD,
                               inspect.Parameter.KEYWORD_ONLY))
          if accept_all and arg_spec.varkw is not None:
              return True
          return (name in arg_spec.args or
                  name in arg_spec.kwonlyargs)
    signature = inspect.signature(func)
    parameter = signature.parameters.get(name)
    if parameter is None:
        if accept_all:
            for param in signature.parameters.values():
                if param.kind == inspect.Parameter.VAR_KEYWORD:
                    return True
        return False
    return (parameter.kind in (inspect.Parameter.POSITIONAL_OR_KEYWORD,
                               inspect.Parameter.KEYWORD_ONLY))
    signature = inspect.signature(func)
    parameter = signature.parameters.get(name)
    if parameter is None:
        if accept_all:
            for param in signature.parameters.values():
                if param.kind == inspect.Parameter.VAR_KEYWORD:
                    return True
        return False
    return (parameter.kind in (inspect.Parameter.POSITIONAL_OR_KEYWORD,
                               inspect.Parameter.KEYWORD_ONLY))
    signature = inspect.signature(func)
    parameter = signature.parameters.get(name)
    if parameter is None:
        if accept_all:
            for param in signature.parameters.values():
                if param.kind == inspect.Parameter.VAR_KEYWORD:
                    return True
        return False
    return (parameter.kind in (inspect.Parameter.POSITIONAL_OR_KEYWORD,
                               inspect.Parameter.KEYWORD_ONLY))
    signature = inspect.signature(func)
    parameter = signature.parameters.get(name)
    if parameter is None:
        if accept_all:
            for param in signature.parameters.values():
                if param.kind == inspect.Parameter.VAR_KEYWORD:
                    return True
        return False
    return (parameter.kind in (inspect.Parameter.POSITIONAL_OR_KEYWORD,
                               inspect.Parameter.KEYWORD_ONLY))
    signature = inspect.signature(func)
    parameter = signature.parameters.get(name)
    if parameter is None:
        if accept_all:
            for param in signature.parameters.values():
                if param.kind == inspect.Parameter.VAR_KEYWORD:
                    return True
        return False
    return (parameter.kind in (inspect.Parameter.POSITIONAL_OR_KEYWORD,
                               inspect.Parameter.KEYWORD_ONLY))
    signature = inspect.signature(func)
    parameter = signature.parameters.get(name)
    if parameter is None:
        if accept_all:
            for param in signature.parameters.values():
                if param.kind == inspect.Parameter.VAR_KEYWORD:
                    return True
        return False
    return (parameter.kind in (inspect.Parameter.POSITIONAL_OR_KEYWORD,
                               inspect.Parameter.KEYWORD_ONLY))
    signature = inspect.signature(func)
    parameter = signature.parameters.get(name)
    if parameter is None:
        if accept_all:
            for param in signature.parameters.values():
                if param.kind == inspect.Parameter.VAR_KEYWORD:
                    return True
        return False
    return (parameter.kind in (inspect.Parameter.POSITIONAL_OR_KEYWORD,
                               inspect.Parameter.KEYWORD_ONLY))
    signature = inspect.signature(func)
    parameter = signature.parameters.get(name)
    if parameter is None:
        if accept_all:
            for param in signature.parameters.values():
                if param.kind == inspect.Parameter.VAR_KEYWORD:
                    return True
        return False
    return (parameter.kind in (inspect.Parameter.POSITIONAL_OR_KEYWORD,
                               inspect.Parameter.KEYWORD_ONLY))
    signature = inspect.signature(func)
    parameter = signature.parameters.get(name)
    if parameter is None:
        if accept_all:
            for param in signature.parameters.values():
                if param.kind == inspect.Parameter.VAR_KEYWORD:
                    return True
        return False
    return (parameter.kind in (inspect.Parameter.POSITIONAL_OR_KEYWORD,
                               inspect.Parameter.KEYWORD_ONLY))
    signature = inspect.signature(func)
    parameter = signature.parameters.get(name)
    if parameter is None:
        if accept_all:
            for param in signature.parameters.values():
                if param.kind == inspect.Parameter.VAR_KEYWORD:
                    return True
        return False
    return (parameter.kind in (inspect.Parameter.POSITIONAL_OR_KEYWORD,
                               inspect.Parameter.KEYWORD_ONLY))
    signature = inspect.signature(func)
    parameter = signature.parameters.get(name)
    if parameter is None:
        if accept_all:
            for param in signature.parameters.values():
                if param.kind == inspect.Parameter.VAR_KEYWORD:
                    return True
        return False
    return (parameter.kind in (inspect.Parameter.POSITIONAL_OR_KEYWORD,
                               inspect.Parameter.KEYWORD_ONLY))
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace
 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/utils.py