          return y
  
      def compute_output_shape(self, input_shape):
          if self.data_format == "channels_first":
              b, k, r, c = input_shape
              return (b,
                      k // (self.scale_factor ** 2),
                      r * self.scale_factor,
                      c * self.scale_factor)
          b, r, c, k = input_shape
          return (b,
                  r * self.scale_factor,
                  c * self.scale_factor,
                  k // (self.scale_factor ** 2))
  
      @classmethod
      def depth_to_space(cls, ipt, scale, data_format=None):
          """ Uses phase shift algorithm to convert channels/depth
              for spatial resolution """
 
</s> remove     def depth_to_space(cls, ipt, scale, data_format=None):
        """ Uses phase shift algorithm to convert channels/depth
            for spatial resolution """
 </s> add     def _depth_to_space(cls, ipt, scale, data_format=None):
        """ Uses phase shift algorithm to convert channels/depth for spatial resolution """ </s> remove     def call(self, x, mask=None):
        y = self.depth_to_space(x, self.scale_factor, self.data_format)
        return y
 </s> add     def call(self, input_tensor, mask=None):  # pylint:disable=unused-argument,arguments-differ
        """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
        """
        retval = self._depth_to_space(input_tensor, self.scale_factor, self.data_format)
        return retval </s> remove             batch_size, c, h, w = input_shape
 </s> add             batch_size, channels, height, width = input_shape </s> remove             rh, rw = self.size
            oh, ow = h * rh, w * rw
            oc = c // (rh * rw)
 </s> add             r_height, r_width = self.size
            o_height, o_width = height * r_height, width * r_width
            o_channels = channels // (r_height * r_width)
            batch, channels, rows, columns = input_shape
            return (batch,
                    channels // (self.scale_factor ** 2),
                    rows * self.scale_factor,
                    columns * self.scale_factor)
        batch, rows, columns, channels = input_shape
        return (batch,
                rows * self.scale_factor,
                columns * self.scale_factor,
                channels // (self.scale_factor ** 2))
          return y
  
      def compute_output_shape(self, input_shape):
          if self.data_format == "channels_first":
            batch, channels, rows, columns = input_shape
            return (batch,
                    channels // (self.scale_factor ** 2),
                    rows * self.scale_factor,
                    columns * self.scale_factor)
        batch, rows, columns, channels = input_shape
        return (batch,
                rows * self.scale_factor,
                columns * self.scale_factor,
                channels // (self.scale_factor ** 2))
            batch, channels, rows, columns = input_shape
            return (batch,
                    channels // (self.scale_factor ** 2),
                    rows * self.scale_factor,
                    columns * self.scale_factor)
        batch, rows, columns, channels = input_shape
        return (batch,
                rows * self.scale_factor,
                columns * self.scale_factor,
                channels // (self.scale_factor ** 2))
            batch, channels, rows, columns = input_shape
            return (batch,
                    channels // (self.scale_factor ** 2),
                    rows * self.scale_factor,
                    columns * self.scale_factor)
        batch, rows, columns, channels = input_shape
        return (batch,
                rows * self.scale_factor,
                columns * self.scale_factor,
                channels // (self.scale_factor ** 2))
            batch, channels, rows, columns = input_shape
            return (batch,
                    channels // (self.scale_factor ** 2),
                    rows * self.scale_factor,
                    columns * self.scale_factor)
        batch, rows, columns, channels = input_shape
        return (batch,
                rows * self.scale_factor,
                columns * self.scale_factor,
                channels // (self.scale_factor ** 2))
            batch, channels, rows, columns = input_shape
            return (batch,
                    channels // (self.scale_factor ** 2),
                    rows * self.scale_factor,
                    columns * self.scale_factor)
        batch, rows, columns, channels = input_shape
        return (batch,
                rows * self.scale_factor,
                columns * self.scale_factor,
                channels // (self.scale_factor ** 2))
            batch, channels, rows, columns = input_shape
            return (batch,
                    channels // (self.scale_factor ** 2),
                    rows * self.scale_factor,
                    columns * self.scale_factor)
        batch, rows, columns, channels = input_shape
        return (batch,
                rows * self.scale_factor,
                columns * self.scale_factor,
                channels // (self.scale_factor ** 2))
            batch, channels, rows, columns = input_shape
            return (batch,
                    channels // (self.scale_factor ** 2),
                    rows * self.scale_factor,
                    columns * self.scale_factor)
        batch, rows, columns, channels = input_shape
        return (batch,
                rows * self.scale_factor,
                columns * self.scale_factor,
                channels // (self.scale_factor ** 2))
            batch, channels, rows, columns = input_shape
            return (batch,
                    channels // (self.scale_factor ** 2),
                    rows * self.scale_factor,
                    columns * self.scale_factor)
        batch, rows, columns, channels = input_shape
        return (batch,
                rows * self.scale_factor,
                columns * self.scale_factor,
                channels // (self.scale_factor ** 2))
            batch, channels, rows, columns = input_shape
            return (batch,
                    channels // (self.scale_factor ** 2),
                    rows * self.scale_factor,
                    columns * self.scale_factor)
        batch, rows, columns, channels = input_shape
        return (batch,
                rows * self.scale_factor,
                columns * self.scale_factor,
                channels // (self.scale_factor ** 2))
            batch, channels, rows, columns = input_shape
            return (batch,
                    channels // (self.scale_factor ** 2),
                    rows * self.scale_factor,
                    columns * self.scale_factor)
        batch, rows, columns, channels = input_shape
        return (batch,
                rows * self.scale_factor,
                columns * self.scale_factor,
                channels // (self.scale_factor ** 2))
  
      @classmethod
      def depth_to_space(cls, ipt, scale, data_format=None):
          """ Uses phase shift algorithm to convert channels/depth
              for spatial resolution """
keep keep keep keep 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