  #!/usr/bin python3
  """ Settings manager for Keras Backend """
  
  import logging
  from typing import Callable, List, Optional, Union
  
  import numpy as np
  import tensorflow as tf
  
  from lib.utils import get_backend
 
</s> remove     """ MTCNN detector for face recognition """
    def __init__(self, **kwargs):
 </s> add     """ MTCNN detector for face recognition. """
    def __init__(self, **kwargs) -> None: </s> remove         self._model = k_load_model(self._model_path, compile=False, **self._model_kwargs)
        if self._backend != "amd":
            self._model.make_predict_function()
 </s> add         with self._context:
            self._model = k_load_model(self._model_path, compile=False, **self._model_kwargs)
            if self._backend != "amd":
                self._model.make_predict_function() </s> remove     """ Keras P-Net model for MTCNN """
    def __init__(self, model_path, allow_growth, exclude_gpus):
 </s> add     """ Keras P-Net model for MTCNN

    Parameters
    ----------
    model_path: str
        The path to the keras model file
    allow_growth: bool, optional
        Enable the Tensorflow GPU allow_growth configuration option. This option prevents
        Tensorflow from allocating all of the GPU VRAM, but can lead to higher fragmentation and
        slower performance. Default: ``False``
    exclude_gpus: list, optional
        A list of indices correlating to connected GPUs that Tensorflow should not use. Pass
        ``None`` to not exclude any GPUs. Default: ``None``
    cpu_mode: bool, optional
        ``True`` run the model on CPU. Default: ``False``
    input_size: int
        The input size of the model
    minsize: int, optional
        The minimum size of a face to accept as a detection. Default: `20`
    threshold: list, optional
        Threshold for P-Net
    """
    def __init__(self,
                 model_path: str,
                 allow_growth: bool,
                 exclude_gpus: List[int],
                 cpu_mode: bool,
                 input_size: int,
                 min_size: int,
                 factor: float,
                 threshold: float) -> None:
from typing import Callable, ContextManager, List, Optional, Union
  #!/usr/bin python3
  """ Settings manager for Keras Backend """
  
  import logging
from typing import Callable, ContextManager, List, Optional, Union
  
  import numpy as np
  import tensorflow as tf
  
  from lib.utils import get_backend
keep keep keep keep replace keep keep keep keep keep
 Add CPU option to BiSeNet and MTCNN
  - Add CPU option to KSession
  - MTCNN optimizations
  - Update docs for bisenet + mtcnn 
lib/model/session.py