              logger.info("Using Convolutional Aware Initialization. Model generation will take a "
                          "few minutes...")
          logger.debug("Initialized %s", self.__class__.__name__)
  
      def get_name(self, name):
          """ Return unique layer name for requested block """
          self.names[name] = self.names.setdefault(name, -1) + 1
          name = "{}_{}".format(name, self.names[name])
          logger.debug("Generating block name: %s", name)
          return name
  
 
</s> remove     def set_default_initializer(self, kwargs):
        """ Sets the default initializer for conv2D and Seperable conv2D layers
            to conv_aware or he_uniform().
            if a specific initializer has been passed in then the specified initializer
            will be used rather than the default """
 </s> add     def _set_default_initializer(self, kwargs):
        """ Sets the default initializer for convolution 2D and Seperable convolution 2D layers
            to Convolutional Aware or he_uniform.

            if a specific initializer has been passed in from the model plugin, then the specified
            initializer will be used rather than the default.

            Parameters
            ----------
            kwargs: dict
                The keyword arguments for the current layer

            Returns
            -------
            dict
                The keyword arguments for the current layer with the initializer updated to
                the select default value
            """ </s> remove     def res_block(self, inp, filters, kernel_size=3, padding="same", **kwargs):
        """ Residual block """
        logger.debug("inp: %s, filters: %s, kernel_size: %s, kwargs: %s)",
                     inp, filters, kernel_size, kwargs)
        name = self.get_name("residual_{}".format(inp.shape[1]))
        var_x = LeakyReLU(alpha=0.2, name="{}_leakyrelu_0".format(name))(inp)
 </s> add     def res_block(self, input_tensor, filters, kernel_size=3, padding="same", **kwargs):
        """ Residual block.

        Parameters
        ----------
        input_tensor: tensor
            The input tensor to the layer
        filters: int
            The dimensionality of the output space (i.e. the number of output filters in the
            convolution)
        kernel_size: int, optional
            An integer or tuple/list of 2 integers, specifying the height and width of the 2D
            convolution window. Can be a single integer to specify the same value for all spatial
            dimensions. Default: 3
        padding: ["valid", "same"], optional
            The padding to use. Default: `"same"`
        kwargs: dict
            Any additional Keras standard layer keyword arguments

        Returns
        -------
        tensor
            The output tensor from the Upscale layer
        """
        logger.debug("input_tensor: %s, filters: %s, kernel_size: %s, kwargs: %s)",
                     input_tensor, filters, kernel_size, kwargs)
        name = self._get_name("residual_{}".format(input_tensor.shape[1]))
        var_x = LeakyReLU(alpha=0.2, name="{}_leakyrelu_0".format(name))(input_tensor) </s> remove         """ Upscale Layer """
        logger.debug("inp: %s, filters: %s, kernel_size: %s, use_instance_norm: %s, kwargs: %s)",
                     inp, filters, kernel_size, use_instance_norm, kwargs)
        name = self.get_name("upscale_{}".format(inp.shape[1]))
 </s> add         """ An upscale layer for sub-pixel up-scaling.

        Adds reflection padding if it has been selected by the user, and other post-processing
        if requested by the plugin.

        Parameters
        ----------
        input_tensor: tensor
            The input tensor to the layer
        filters: int
            The dimensionality of the output space (i.e. the number of output filters in the
            convolution)
        kernel_size: int, optional
            An integer or tuple/list of 2 integers, specifying the height and width of the 2D
            convolution window. Can be a single integer to specify the same value for all spatial
            dimensions. Default: 3
        padding: ["valid", "same"], optional
            The padding to use. Default: `"same"`
        use_instance_norm: bool, optional
            ``True`` if instance normalization should be applied after the convolutional layer.
            Default: ``False``
        res_block_follows: bool, optional
            If a residual block will follow this layer, then this should be set to `True` to add
            a leaky ReLu after the convolutional layer. Default: ``False``
        scale_factor: int, optional
            The amount to upscale the image. Default: `2`
        kwargs: dict
            Any additional Keras standard layer keyword arguments

        Returns
        -------
        tensor
            The output tensor from the Upscale layer
        """
        logger.debug("input_tensor: %s, filters: %s, kernel_size: %s, use_instance_norm: %s, "
                     "kwargs: %s)", input_tensor, filters, kernel_size, use_instance_norm, kwargs)
        name = self._get_name("upscale_{}".format(input_tensor.shape[1])) </s> remove         """ Convolution Layer"""
        logger.debug("inp: %s, filters: %s, kernel_size: %s, strides: %s, use_instance_norm: %s, "
                     "kwargs: %s)", inp, filters, kernel_size, strides, use_instance_norm, kwargs)
        name = self.get_name("conv_{}".format(inp.shape[1]))
 </s> add         """ A standard Convolution 2D layer which applies user specified configuration to the
        layer.

        Adds reflection padding if it has been selected by the user, and other post-processing
        if requested by the plugin.

        Parameters
        ----------
        input_tensor: tensor
            The input tensor to the layer
        filters: int
            The dimensionality of the output space (i.e. the number of output filters in the
            convolution)
        kernel_size: int, optional
            An integer or tuple/list of 2 integers, specifying the height and width of the 2D
            convolution window. Can be a single integer to specify the same value for all spatial
            dimensions. Default: 5
        strides: tuple or int, optional
            An integer or tuple/list of 2 integers, specifying the strides of the convolution along
            the height and width. Can be a single integer to specify the same value for all spatial
            dimensions. Default: `2`
        padding: ["valid", "same"], optional
            The padding to use. Default: `"same"`
        use_instance_norm: bool, optional
            ``True`` if instance normalization should be applied after the convolutional layer.
            Default: ``False``
        res_block_follows: bool, optional
            If a residual block will follow this layer, then this should be set to `True` to add
            a leaky ReLu after the convolutional layer. Default: ``False``
        kwargs: dict
            Any additional Keras standard layer keyword arguments

        Returns
        -------
        tensor
            The output tensor from the Convolution 2D Layer
        """
        logger.debug("input_tensor: %s, filters: %s, kernel_size: %s, strides: %s, "
                     "use_instance_norm: %s, kwargs: %s)", input_tensor, filters, kernel_size,
                     strides, use_instance_norm, kwargs)
        name = self._get_name("conv_{}".format(input_tensor.shape[1])) </s> remove     def conv(self, inp, filters, kernel_size=5, strides=2, padding="same",
 </s> add     def conv(self, input_tensor, filters, kernel_size=5, strides=2, padding="same",
    def _get_name(self, name):
        """ Return unique layer name for requested block.

        As blocks can be used multiple times, auto appends an integer to the end of the requested
        name to keep all block names unique

        Parameters
        ----------
        name: str
            The requested name for the layer

        Returns
        -------
        str
            The unique name for this layer
        """
              logger.info("Using Convolutional Aware Initialization. Model generation will take a "
                          "few minutes...")
          logger.debug("Initialized %s", self.__class__.__name__)
  
    def _get_name(self, name):
        """ Return unique layer name for requested block.

        As blocks can be used multiple times, auto appends an integer to the end of the requested
        name to keep all block names unique

        Parameters
        ----------
        name: str
            The requested name for the layer

        Returns
        -------
        str
            The unique name for this layer
        """
    def _get_name(self, name):
        """ Return unique layer name for requested block.

        As blocks can be used multiple times, auto appends an integer to the end of the requested
        name to keep all block names unique

        Parameters
        ----------
        name: str
            The requested name for the layer

        Returns
        -------
        str
            The unique name for this layer
        """
          self.names[name] = self.names.setdefault(name, -1) + 1
          name = "{}_{}".format(name, self.names[name])
          logger.debug("Generating block name: %s", name)
          return name
  
keep keep keep keep 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/nn_blocks.py