'Device to use with the optimizer.
Returns:
A value suitable for `tf.device()`.'

def optimizer_device(self):

    if ((self._num_ps_tasks > 0) or (self._num_clones > 0)):
        return (self._worker_device + '/device:CPU:0')
    else:
        return ''
