  import os
  
  import cv2
  import numpy as np
  from fastcluster import linkage
  from lib.utils import GetModel, set_system_verbosity
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  
  
  class VGGFace2():
 
</s> remove         num_predictions = predictions.shape[0]
        result_linkage = linkage(predictions, method=method, preserve_input=False)
 </s> add         num_predictions, dims = predictions.shape

        clustering_method = self._get_clustering_method(num_predictions, dims)

        kwargs = dict(method=method)
        if clustering_method == "linkage":
            kwargs["preserve_input"] = False
            func = linkage
        else:
            func = linkage_vector

        result_linkage = func(predictions, **kwargs)
        print(result_linkage.shape)
        exit(0) </s> remove     def get_model(self, git_model_id, model_filename, backend):
 </s> add     @staticmethod
    def get_model(git_model_id, model_filename, backend):
from fastcluster import linkage, linkage_vector
from lib.utils import GetModel, set_system_verbosity, FaceswapError
  import os
  
  import cv2
  import numpy as np
from fastcluster import linkage, linkage_vector
from lib.utils import GetModel, set_system_verbosity, FaceswapError
from fastcluster import linkage, linkage_vector
from lib.utils import GetModel, set_system_verbosity, FaceswapError
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  
  
  class VGGFace2():
keep keep keep keep replace replace keep keep keep keep keep
 sort by face - Automatically switch to vector_linkage if not enough free RAM 
lib/vgg_face2_keras.py