          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")
 
</s> remove     def func(input_):
        inputs = [input_[:, :, :, i:i + 1] for i in range(K.int_shape(input_)[-1])]
 </s> add     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])] </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 make_kernel(sigma):
 </s> add     def _make_kernel(sigma):
        """ Make the gaussian kernel. """ </s> remove     return inner_loss
 </s> add     return _inner_loss </s> remove         output = tf.atan(K.squeeze(output[:, :, :, :, 0] / output[:, :, :, :, 1]))
    # magnitude of edges -- unified x & y edges don't work well with NN

 </s> add         output = tf.atan(K.squeeze(output[:, :, :, :, 0] / output[:, :, :, :, 1], axis=None))
    # magnitude of edges -- unified x & y edges don't work well with Neural Networks
    gauss_kernel = _make_kernel(radius)
          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")
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