  
      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
 
</s> remove     gauss_kernel = make_kernel(radius)
 </s> add     gauss_kernel = _make_kernel(radius) </s> remove     return inner_loss
 </s> add     return _inner_loss </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     def inner_loss(y_true, y_pred):
        # Branching because tensorflows broadcasting is wonky and
        # plaidmls concatenate is implemented ineficient.
 </s> add     def _inner_loss(y_true, y_pred):
        """ Apply the loss function to the masked area of the image.

         Parameters
        ----------
        y_true: tensor or variable
            The ground truth value
        y_pred: tensor or variable
            The predicted value

        Returns
        -------
        tensor
            The Loss value

        Notes
        -----
        Branching because TensorFlow's broadcasting is wonky and plaidML's concatenate is
        implemented inefficiently.
        """ </s> remove     def diff_yy(img):
 </s> add     def _diff_yy(img):
        """ Y-Y Difference """
    def func(input_tensor):
        """ Apply gaussian blurring to the input tensor

        Parameters
        ----------
        input_tensor: tensor
            The input to have gaussian blurring applied.

        Returns
        -------
        tensor
            The input with gaussian blurring applied
        """
        inputs = [input_tensor[:, :, :, i:i + 1] for i in range(K.int_shape(input_tensor)[-1])]
  
      gauss_kernel = make_kernel(radius)
      gauss_kernel = gauss_kernel[:, :, np.newaxis, np.newaxis]
  
    def func(input_tensor):
        """ Apply gaussian blurring to the input tensor

        Parameters
        ----------
        input_tensor: tensor
            The input to have gaussian blurring applied.

        Returns
        -------
        tensor
            The input with gaussian blurring applied
        """
        inputs = [input_tensor[:, :, :, i:i + 1] for i in range(K.int_shape(input_tensor)[-1])]
    def func(input_tensor):
        """ Apply gaussian blurring to the input tensor

        Parameters
        ----------
        input_tensor: tensor
            The input to have gaussian blurring applied.

        Returns
        -------
        tensor
            The input with gaussian blurring applied
        """
        inputs = [input_tensor[:, :, :, i:i + 1] for i in range(K.int_shape(input_tensor)[-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
keep keep keep keep replace replace 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