              The number of dimensions in the vgg_face output
  
          Returns
          -------
              str: 'linkage' or 'vector'
          """
          np_float = 24  # bytes size of a numpy float
          divider = 1024 * 1024  # bytes to MB
  
          free_ram = psutil.virtual_memory().free / divider
 
</s> remove         linkage_required = (((item_count ** 2) * np_float) / 1.7) / divider
 </s> add         linkage_required = (((item_count ** 2) * np_float) / 1.8) / divider </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         """ Find the cosine similarity between a source face and a test face """
 </s> add         """ Find the cosine similarity between two faces.

        Parameters
        ----------
        source_face: numpy.ndarray
            The first face to test against :attr:`test_face`
        test_face: numpy.ndarray
            The second face to test against :attr:`source_face`

        Returns
        -------
        float:
            The cosine similarity between the two faces
        """ </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.
        """ </s> remove             seriation computes the order implied by a hierarchical tree (dendrogram)
 </s> add         Seriation computes the order implied by a hierarchical tree (dendrogram).

        Parameters
        ----------
        tree: numpy.ndarray
           A hierarchical tree (dendrogram)
        points: int
            The number of points given to the clustering process
        current_index: int
            The position in the tree for the recursive traversal

        Returns
        -------
        list:
            The indices in the order implied by the hierarchical tree
            bool:
                ``True`` if vector_linkage should be used. ``False`` if linkage should be used
              The number of dimensions in the vgg_face output
  
          Returns
          -------
            bool:
                ``True`` if vector_linkage should be used. ``False`` if linkage should be used
          """
          np_float = 24  # bytes size of a numpy float
          divider = 1024 * 1024  # bytes to MB
  
          free_ram = psutil.virtual_memory().free / divider
keep keep keep keep 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