          """
          logger.info("Sorting face distances. Depending on your dataset this may take some time...")
          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:
 
</s> remove         if clustering_method == "linkage":
 </s> add         if self._use_vector_linkage(num_predictions, dims):
            func = linkage_vector
        else: </s> remove         else:
            func = linkage_vector
 </s> add  </s> remove         """ Sort a matrix of predictions by similarity Adapted from:
            https://gmarti.gitlab.io/ml/2017/09/07/how-to-sort-distance-matrix.html
        input:
            - predictions is a stacked matrix of vgg_face predictions shape: (x, 4096)
            - method = ["ward","single","average","complete"]
        output:
            - result_order is a list of indices with the order implied by the hierarhical tree

        sorted_similarity transforms a distance matrix into a sorted distance matrix according to
        the order implied by the hierarchical tree (dendrogram)
 </s> add         """ Sort a matrix of predictions by similarity.

        Transforms a distance matrix into a sorted distance matrix according to the order implied
        by the hierarchical tree (dendrogram).

        Parameters
        ----------
        predictions: numpy.ndarray
            A stacked matrix of vgg_face2 predictions of the shape (`N`, `D`) where `N` is the
            number of observations and `D` are the number of dimensions.  NB: The given
            :attr:`predictions` will be overwritten to save memory. If you still require the 
            original values you should take a copy prior to running this method
        method: ['single','centroid','median','ward']
            The clustering method to use.

        Returns
        -------
        list:
            List of indices with the order implied by the hierarchical tree </s> remove         print(result_linkage.shape)
        exit(0)
        result_order = self.seriation(result_linkage,
                                      num_predictions,
                                      num_predictions + num_predictions - 2)

 </s> add         result_order = self._seriation(result_linkage,
                                       num_predictions,
                                       num_predictions + num_predictions - 2) </s> remove     def get_model(git_model_id, model_filename, backend):
        """ Check if model is available, if not, download and unzip it """
 </s> add     def _get_model(git_model_id, model_filename, backend):
        """ Check if model is available, if not, download and unzip it

        Parameters
        ----------
        git_model_id: int
            The second digit in the github tag that identifies this model. See
            https://github.com/deepfakes-models/faceswap-models for more information
        model_filename: str
            The name of the model to be loaded (see :class:`lib.utils.GetModel` for more
            information)
        backend: ['GPU', 'CPU']
            Whether to run inference on a GPU or on the CPU

        See Also
        --------
        lib.utils.GetModel: The model downloading and allocation class.
        """
          """
          logger.info("Sorting face distances. Depending on your dataset this may take some time...")
          num_predictions, dims = predictions.shape
  


          kwargs = dict(method=method)
          if clustering_method == "linkage":
              kwargs["preserve_input"] = False
              func = linkage
          else:
keep keep keep keep replace replace keep keep keep keep keep
 bugfix: tools.preview - Fix for new icons
bugfix: lib.vgg_face2_keras - Remove debug code
documentation: lib.vgg_face2_keras 
lib/vgg_face2_keras.py