      logger.debug(default)
      return default
  
  
  def gaussian_blur(radius=2.0):
      """ From https://github.com/iperov/DeepFaceLab
          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)
          return kernel
  
      gauss_kernel = make_kernel(radius)
      gauss_kernel = gauss_kernel[:, :, np.newaxis, np.newaxis]
  
      def func(input_):
          inputs = [input_[:, :, :, i:i + 1] for i in range(K.int_shape(input_)[-1])]
          outputs = [K.conv2d(inp, K.constant(gauss_kernel), strides=(1, 1), padding="same")
                     for inp in inputs]
          return K.concatenate(outputs, axis=-1)
      return func
  
  
  class Mask():
      """ Parent class for masks
  
          the output mask will be <mask_type>.mask
          channels: 1, 3 or 4:
 
</s> remove                               generalized_loss, l_inf_norm, gmsd_loss)
from lib.model.masks import gaussian_blur
 </s> add                               generalized_loss, l_inf_norm, gmsd_loss, gaussian_blur) </s> remove import keras.backend as K
 </s> add  </s> remove from .masks import gaussian_blur
 </s> add 
      logger.debug(default)
      return default
  
  

























  class Mask():
      """ Parent class for masks
  
          the output mask will be <mask_type>.mask
          channels: 1, 3 or 4:
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Move gaussian_blur to losses (fixes plaidml race condition) 
lib/model/masks.py