                  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 """
          if data_format is None:
              data_format = K.image_data_format()
          data_format = data_format.lower()
          ipt = cls._preprocess_conv2d_input(ipt, data_format)
          out = tf.depth_to_space(ipt, scale)
 
</s> remove             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))
 </s> add             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)) </s> remove             out = K.reshape(out, (batch_size, oc, oh, ow))
 </s> add             out = K.reshape(out, (batch_size, o_channels, o_height, o_width)) </s> remove             out = K.reshape(inputs, (batch_size, rh, rw, oc, h, w))
 </s> add             out = K.reshape(inputs, (batch_size, r_height, r_width, o_channels, height, width)) </s> remove             batch_size, h, w, c = input_shape
 </s> add             batch_size, height, width, channels = input_shape </s> remove             x = tf.transpose(x, (0, 3, 1, 2))
 </s> add             input_tensor = tf.transpose(input_tensor, (0, 3, 1, 2))
    def _depth_to_space(cls, ipt, scale, data_format=None):
        """ Uses phase shift algorithm to convert channels/depth for spatial resolution """
                  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 """
    def _depth_to_space(cls, ipt, scale, data_format=None):
        """ Uses phase shift algorithm to convert channels/depth for spatial resolution """
    def _depth_to_space(cls, ipt, scale, data_format=None):
        """ Uses phase shift algorithm to convert channels/depth for spatial resolution """
          if data_format is None:
              data_format = K.image_data_format()
          data_format = data_format.lower()
          ipt = cls._preprocess_conv2d_input(ipt, data_format)
          out = tf.depth_to_space(ipt, scale)
keep keep keep keep 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