          logger.debug("Optimizer CPU Mode set to %s", retval)
          return retval
  
      def get_updates(self, loss, params):
          grads = self.get_gradients(loss, params)
          self.updates = [K.update_add(self.iterations, 1)]
  
          lr = self.lr
          if self.initial_decay > 0:
 
</s> remove     def set_cpu_mode(cpu_mode):
        """ Set the CPU mode to 0 if not using tensorflow, else passed in arg """
 </s> add     def _set_cpu_mode(cpu_mode):
        """ Sets the CPU mode to False if not using Tensorflow, otherwise the given value.

        Parameters
        ----------
        cpu_mode: bool
            Set to ``True`` to perform some of the calculations on CPU for Nvidia backends,
            otherwise ``False``.

        Returns
        -------
        bool
            ``True`` if some calculations should be performed on CPU otherwise ``False``
        """ </s> remove     def update_1(self, params):
        """ First update on CPU or GPU """
 </s> add     def _update_1(self, params):
        """ Perform the first update. Run under CPU context if running on Tensorflow and CPU mode
        is enabled, otherwise run on the default device. """ </s> remove         self.cpu_mode = self.set_cpu_mode(cpu_mode)
 </s> add         self.cpu_mode = self._set_cpu_mode(cpu_mode) </s> remove                 ms, vs, vhats = self.update_1(params)
 </s> add                 ms, vs, vhats = self._update_1(params) </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
        """ Obtain the optimizer loss updates.

        Parameters
        ----------
        loss: list
            List of tensors

        params: list
            List of tensors

        Returns
        -------
        list
            List of tensors
        """
          logger.debug("Optimizer CPU Mode set to %s", retval)
          return retval
  
      def get_updates(self, loss, params):
        """ Obtain the optimizer loss updates.

        Parameters
        ----------
        loss: list
            List of tensors

        params: list
            List of tensors

        Returns
        -------
        list
            List of tensors
        """
          grads = self.get_gradients(loss, params)
          self.updates = [K.update_add(self.iterations, 1)]
  
          lr = self.lr
          if self.initial_decay > 0:
keep keep keep add 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/optimizers.py