          Used for blurring mask in training """
      def gaussian(var_x, radius, sigma):
          return np.exp(-(float(var_x) - float(radius)) ** 2 / (2 * sigma ** 2))
  
      def make_kernel(sigma):
          kernel_size = max(3, int(2 * 2 * sigma + 1))
          mean = np.floor(0.5 * kernel_size)
          kernel_1d = np.array([gaussian(x, mean, sigma) for x in range(kernel_size)])
          np_kernel = np.outer(kernel_1d, kernel_1d).astype(dtype=K.floatx())
          kernel = np_kernel / np.sum(np_kernel)
 
</s> remove         kernel_1d = np.array([gaussian(x, mean, sigma) for x in range(kernel_size)])
 </s> add         kernel_1d = np.array([_gaussian(x, mean, sigma) for x in range(kernel_size)]) </s> remove     """ From https://github.com/iperov/DeepFaceLab
        Used for blurring mask in training """
    def gaussian(var_x, radius, sigma):
 </s> add     """ Apply gaussian blur to an input.

    Used for blurring mask in training.

    Parameters
    ----------
    radius: float, optional
        The kernel radius for applying gaussian blur. Default: `2.0`

    Returns
    -------
    tensor
        The input tensor with gaussian blurring applied

    References
    ----------
    https://github.com/iperov/DeepFaceLab
    """
    def _gaussian(var_x, radius, sigma):
        """ Obtain the gaussian kernel. """ </s> remove     gauss_kernel = make_kernel(radius)
 </s> add     gauss_kernel = _make_kernel(radius) </s> remove         self.c_1 = (self.k1 * self.max_value) ** 2
        self.c_2 = (self.k2 * self.max_value) ** 2
 </s> add         self.c_1 = (self.k_1 * self.max_value) ** 2
        self.c_2 = (self.k_2 * self.max_value) ** 2 </s> remove         self.k1 = k1
        self.k2 = k2
 </s> add         self.k_1 = k_1
        self.k_2 = k_2
    def _make_kernel(sigma):
        """ Make the gaussian kernel. """
          Used for blurring mask in training """
      def gaussian(var_x, radius, sigma):
          return np.exp(-(float(var_x) - float(radius)) ** 2 / (2 * sigma ** 2))
  
    def _make_kernel(sigma):
        """ Make the gaussian kernel. """
          kernel_size = max(3, int(2 * 2 * sigma + 1))
          mean = np.floor(0.5 * kernel_size)
          kernel_1d = np.array([gaussian(x, mean, sigma) for x in range(kernel_size)])
          np_kernel = np.outer(kernel_1d, kernel_1d).astype(dtype=K.floatx())
          kernel = np_kernel / np.sum(np_kernel)
keep keep keep keep replace keep keep keep keep keep
 Simple backend unit tests (#1020)

* Add simple backend tests for lib.model
* Document lib.model
* Fix GMSD Loss for AMD
* Remove obsolete code from lib.model 
lib/model/losses.py