  from lib.model.session import KSession
  from lib.utils import get_backend
  from ._base import Detector, logger
  
  
  class Detect(Detector):
      """ S3FD detector for face recognition """
      def __init__(self, **kwargs):
 
</s> remove # pylint:disable=import-error
from keras.layers import Conv2D, Dense, Flatten, Input, MaxPool2D, Permute, PReLU
 </s> add 
if get_backend() == "amd":
    import keras
    from keras import backend as K
    from keras.layers import Concatenate, Conv2D, Input, Maximum, MaxPooling2D, ZeroPadding2D
else:
    # Ignore linting errors from Tensorflow's thoroughly broken import system
    from tensorflow import keras
    from tensorflow.keras import backend as K  # pylint:disable=import-error
    from tensorflow.keras.layers import (  # pylint:disable=no-name-in-module,import-error
        Concatenate, Conv2D, Input, Maximum, MaxPooling2D, ZeroPadding2D)

  from lib.model.session import KSession
  from lib.utils import get_backend
  from ._base import Detector, logger
  
if get_backend() == "amd":
    import keras
    from keras import backend as K
    from keras.layers import Concatenate, Conv2D, Input, Maximum, MaxPooling2D, ZeroPadding2D
else:
    # Ignore linting errors from Tensorflow's thoroughly broken import system
    from tensorflow import keras
    from tensorflow.keras import backend as K  # pylint:disable=import-error
    from tensorflow.keras.layers import (  # pylint:disable=no-name-in-module,import-error
        Concatenate, Conv2D, Input, Maximum, MaxPooling2D, ZeroPadding2D)

  
  class Detect(Detector):
      """ S3FD detector for face recognition """
      def __init__(self, **kwargs):
keep keep keep add keep keep keep keep
 Update all Keras Imports to be conditional (#1214)

* Remove custom keras importer

* first round keras imports fix

* launcher.py: Remove KerasFinder references

* 2nd round keras imports update (lib and extract)

* 3rd round keras imports update (train)

* remove KerasFinder from tests

* 4th round keras imports update (tests) 
plugins/extract/detect/s3fd.py