          """
          if K.dtype(x) == "float64":
              x = tf.cast(x, "float32")
          if data_format == "channels_first":
              # TF uses the last dimension as channel dimension,
              # instead of the 2nd one.
              # TH input shape: (samples, input_depth, rows, cols)
              # TF input shape: (samples, rows, cols, input_depth)
              x = tf.transpose(x, (0, 2, 3, 1))
          return x
  
      def get_config(self):
          config = {"scale_factor": self.scale_factor,
                    "data_format": self.data_format}
          base_config = super(SubPixelUpscaling, self).get_config()
 
</s> remove         if K.dtype(x) == "float64":
            x = tf.cast(x, "float32")
 </s> add         if K.dtype(input_tensor) == "float64":
            input_tensor = tf.cast(input_tensor, "float32") </s> remove         # Arguments
            x: input tensor.
            data_format: string, `"channels_last"` or `"channels_first"`.
        # Returns
            A tensor.
 </s> add         Parameters
        ----------
        input_tensor: tensor
            The input that requires transposing and casting
        data_format: str
            `"channels_last"` or `"channels_first"`

        Returns
        -------
        tensor
            The transposed and cast input tensor </s> remove             x = tf.cast(x, "float64")
        return x
 </s> add             input_tensor = tf.cast(input_tensor, "float64")
        return input_tensor </s> remove             x = tf.transpose(x, (0, 3, 1, 2))
 </s> add             input_tensor = tf.transpose(input_tensor, (0, 3, 1, 2))
            # Tensorflow uses the last dimension as channel dimension, instead of the 2nd one.
            # Theano input shape: (samples, input_depth, rows, cols)
            # Tensorflow input shape: (samples, rows, cols, input_depth)
            input_tensor = tf.transpose(input_tensor, (0, 2, 3, 1))
        return input_tensor
          """
          if K.dtype(x) == "float64":
              x = tf.cast(x, "float32")
          if data_format == "channels_first":
            # Tensorflow uses the last dimension as channel dimension, instead of the 2nd one.
            # Theano input shape: (samples, input_depth, rows, cols)
            # Tensorflow input shape: (samples, rows, cols, input_depth)
            input_tensor = tf.transpose(input_tensor, (0, 2, 3, 1))
        return input_tensor
            # Tensorflow uses the last dimension as channel dimension, instead of the 2nd one.
            # Theano input shape: (samples, input_depth, rows, cols)
            # Tensorflow input shape: (samples, rows, cols, input_depth)
            input_tensor = tf.transpose(input_tensor, (0, 2, 3, 1))
        return input_tensor
            # Tensorflow uses the last dimension as channel dimension, instead of the 2nd one.
            # Theano input shape: (samples, input_depth, rows, cols)
            # Tensorflow input shape: (samples, rows, cols, input_depth)
            input_tensor = tf.transpose(input_tensor, (0, 2, 3, 1))
        return input_tensor
            # Tensorflow uses the last dimension as channel dimension, instead of the 2nd one.
            # Theano input shape: (samples, input_depth, rows, cols)
            # Tensorflow input shape: (samples, rows, cols, input_depth)
            input_tensor = tf.transpose(input_tensor, (0, 2, 3, 1))
        return input_tensor
            # Tensorflow uses the last dimension as channel dimension, instead of the 2nd one.
            # Theano input shape: (samples, input_depth, rows, cols)
            # Tensorflow input shape: (samples, rows, cols, input_depth)
            input_tensor = tf.transpose(input_tensor, (0, 2, 3, 1))
        return input_tensor
            # Tensorflow uses the last dimension as channel dimension, instead of the 2nd one.
            # Theano input shape: (samples, input_depth, rows, cols)
            # Tensorflow input shape: (samples, rows, cols, input_depth)
            input_tensor = tf.transpose(input_tensor, (0, 2, 3, 1))
        return input_tensor
  
      def get_config(self):
          config = {"scale_factor": self.scale_factor,
                    "data_format": self.data_format}
          base_config = super(SubPixelUpscaling, self).get_config()
keep keep keep keep 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