          return dict(list(base_config.items()) + list(config.items()))
  
  
  class GlobalMinPooling2D(_GlobalPooling2D):
      """Global minimum pooling operation for spatial data.
      # Arguments
          data_format: A string,
              one of `channels_last` (default) or `channels_first`.
              The ordering of the dimensions in the inputs.
              `channels_last` corresponds to inputs with shape
              `(batch, height, width, channels)` while `channels_first`
              corresponds to inputs with shape
              `(batch, channels, height, width)`.
              It defaults to the `image_data_format` value found in your
              Keras config file at `~/.keras/keras.json`.
              If you never set it, then it will be "channels_last".
      # Input shape
          - If `data_format='channels_last'`:
              4D tensor with shape:
              `(batch_size, rows, cols, channels)`
          - If `data_format='channels_first'`:
              4D tensor with shape:
              `(batch_size, channels, rows, cols)`
      # Output shape
          2D tensor with shape:
          `(batch_size, channels)`
      """
  
      def call(self, inputs):
          if self.data_format == 'channels_last':
              pooled = K.min(inputs, axis=[1, 2])
          else:
 
</s> remove     """Global standard deviation pooling operation for spatial data.
    # Arguments
        data_format: A string,
            one of `channels_last` (default) or `channels_first`.
            The ordering of the dimensions in the inputs.
            `channels_last` corresponds to inputs with shape
            `(batch, height, width, channels)` while `channels_first`
            corresponds to inputs with shape
            `(batch, channels, height, width)`.
            It defaults to the `image_data_format` value found in your
            Keras config file at `~/.keras/keras.json`.
            If you never set it, then it will be "channels_last".
    # Input shape
        - If `data_format='channels_last'`:
            4D tensor with shape:
            `(batch_size, rows, cols, channels)`
        - If `data_format='channels_first'`:
            4D tensor with shape:
            `(batch_size, channels, rows, cols)`
    # Output shape
        2D tensor with shape:
        `(batch_size, channels)`
    """
 </s> add     """Global standard deviation pooling operation for spatial data. """ </s> remove     This layer can add rows and columns
    at the top, bottom, left and right side of an image tensor.
    Input shape:  ONLY WORKS ON CHANNELS LAST NOW
      4D tensor with shape:
      - If `data_format` is `"channels_last"`:
          `(batch, rows, cols, channels)`
      - If `data_format` is `"channels_first"`:
          `(batch, channels, rows, cols)`
    Output shape:
      4D tensor with shape:
      - If `data_format` is `"channels_last"`:
          `(batch, padded_rows, padded_cols, channels)`
      - If `data_format` is `"channels_first"`:
          `(batch, channels, padded_rows, padded_cols)`
 </s> add     This layer can add rows and columns at the top, bottom, left and right side of an image tensor.

    Parameters
    ----------
    stride: int, optional
        The stride of the following convolution. Default: `2`
    kernel_size: int, optional
        The kernel size of the following convolution. Default: `5`
    kwargs: dict
        The standard Keras Layer keyword arguments (if any) </s> remove     # pylint: disable=C0103
    """ Sub-pixel convolutional upscaling layer based on the paper "Real-Time
    Single Image and Video Super-Resolution Using an Efficient Sub-Pixel
    Convolutional Neural Network" (https://arxiv.org/abs/1609.05158).
    This layer requires a Convolution2D prior to it, having output filters
    computed according to the formula :
        filters = k * (scale_factor * scale_factor)
        where k = a user defined number of filters (generally larger than 32)
              scale_factor = the upscaling 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.
    # Example :
    ```python
        # A standard subpixel upscaling block
        x = Convolution2D(256, 3, 3, padding="same", activation="relu")(...)
        u = SubPixelUpscaling(scale_factor=2)(x)
        [Optional]
        x = Convolution2D(256, 3, 3, padding="same", activation="relu")(u)
    ```
        In practice, it is useful to have a second convolution layer after the
        SubPixelUpscaling layer to speed up the learning process.
        However, if you are stacking multiple SubPixelUpscaling blocks,
        it may increase the number of parameters greatly, so the Convolution
        layer after SubPixelUpscaling layer can be removed.
    # Arguments
        scale_factor: Upscaling factor.
        data_format: Can be None, "channels_first" or "channels_last".
    # Input shape
        4D tensor with shape:
        `(samples, k * (scale_factor * scale_factor) channels, rows, cols)`
            if data_format="channels_first"
        or 4D tensor with shape:
        `(samples, rows, cols, k * (scale_factor * scale_factor) channels)`
            if data_format="channels_last".
    # Output shape
        4D tensor with shape:
        `(samples, k channels, rows * scale_factor, cols * scale_factor))`
            if data_format="channels_first"
        or 4D tensor with shape:
        `(samples, rows * scale_factor, cols * scale_factor, k channels)`
            if data_format="channels_last".
 </s> add     """ Sub-pixel convolutional up-scaling layer.

    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
    -----
    This method is deprecated as it just performs the same as :class:`PixelShuffler`
    using explicit Tensorflow ops. The method is kept in the repository to support legacy
    models that have been created with this layer.

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

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

    Parameters
    ----------
    size: int, optional
        The up-scaling factor. Default: `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
    ----------
    based on the paper "Real-Time Single Image and Video Super-Resolution Using an Efficient
    Sub-Pixel Convolutional Neural Network" (https://arxiv.org/abs/1609.05158).
    """Global minimum pooling operation for spatial data. """
          return dict(list(base_config.items()) + list(config.items()))
  
  
  class GlobalMinPooling2D(_GlobalPooling2D):
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
    """Global minimum pooling operation for spatial data. """
  
      def call(self, inputs):
          if self.data_format == 'channels_last':
              pooled = K.min(inputs, axis=[1, 2])
          else:
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 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