      """ PixelShuffler layer for Keras
         by t-ae: https://gist.github.com/t-ae/6e1016cc188104d123676ccef3264981 """
      # pylint: disable=C0103
      def __init__(self, size=(2, 2), data_format=None, **kwargs):
          super(PixelShuffler, self).__init__(**kwargs)
          self.data_format = K.normalize_data_format(data_format)
          self.size = conv_utils.normalize_tuple(size, 2, 'size')
  
      def call(self, inputs, **kwargs):
  
 
</s> remove         self.size = conv_utils.normalize_tuple(size, 2, 'size')
 </s> add         self.size = conv_utils.normalize_tuple(size, 2, "size") </s> remove     """ PixelShuffler layer for Keras
       by t-ae: https://gist.github.com/t-ae/6e1016cc188104d123676ccef3264981 """
    # pylint: disable=C0103
 </s> add     """ PixelShuffler layer for Keras.

    This layer requires a Convolution2D prior to it, having output filters computed according to
    the formula :math:`filters = k * (scale_factor * scale_factor)` where `k` is a user defined
    number of filters (generally larger than 32) and `scale_factor` is the up-scaling factor
    (generally 2).

    This layer performs the depth to space operation on the convolution filters, and returns a
    tensor with the size as defined below.

    Notes
    -----
    In practice, it is useful to have a second convolution layer after the
    :class:`PixelShuffler` layer to speed up the learning process. However, if you are stacking
    multiple :class:`PixelShuffler` blocks, it may increase the number of parameters greatly,
    so the Convolution layer after :class:`PixelShuffler` layer can be removed.

    Example
    -------
    >>> # A standard sub-pixel up-scaling block
    >>> x = Convolution2D(256, 3, 3, padding="same", activation="relu")(...)
    >>> u = PixelShuffler(size=(2, 2))(x)
    [Optional]
    >>> x = Convolution2D(256, 3, 3, padding="same", activation="relu")(u)

    Parameters
    ----------
    size: tuple, optional
        The (`h`, `w`) scaling factor for up-scaling. Default: `(2, 2)`
    data_format: ["channels_first", "channels_last", ``None``], optional
        The data format for the input. Default: ``None``
    kwargs: dict
        The standard Keras Layer keyword arguments (if any)

    References
    ----------
    https://gist.github.com/t-ae/6e1016cc188104d123676ccef3264981
    """ </s> remove 
 </s> add         """This is where the layer's logic lives.

        Parameters
        ----------
        inputs: tensor
            Input tensor, or list/tuple of input tensors
        kwargs: dict
            Additional keyword arguments

        Returns
        -------
        tensor
            A tensor or list/tuple of tensors
        """ </s> remove class L2_normalize(Layer):
 </s> add class L2_normalize(Layer):  # Pylint:disable=invalid-name
    """ Normalizes a tensor w.r.t. the L2 norm alongside the specified axis.

    Parameters
    ----------
    axis: int
        The axis to perform normalization across
    kwargs: dict
        The standard Keras Layer keyword arguments (if any)
    """ </s> remove class Scale(Layer):
    """
    GAN Custom Scal Layer
    Code borrows from https://github.com/flyyufelix/cnn_finetune
    """
    def __init__(self, weights=None, axis=-1, gamma_init='zero', **kwargs):
        self.axis = axis
        self.gamma = None
        self.gamma_init = initializers.get(gamma_init)
        self.initial_weights = weights
        super(Scale, self).__init__(**kwargs)

    def build(self, input_shape):
        self.input_spec = [InputSpec(shape=input_shape)]
 </s> add         The configuration of a layer does not include connectivity information, nor the layer
        class name. These are handled by `Network` (one layer of abstraction above).
        super().__init__(**kwargs)
      """ PixelShuffler layer for Keras
         by t-ae: https://gist.github.com/t-ae/6e1016cc188104d123676ccef3264981 """
      # pylint: disable=C0103
      def __init__(self, size=(2, 2), data_format=None, **kwargs):
        super().__init__(**kwargs)
          self.data_format = K.normalize_data_format(data_format)
          self.size = conv_utils.normalize_tuple(size, 2, 'size')
  
      def call(self, inputs, **kwargs):
  
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/layers.py