from tensorflow.python.ops import array_ops

        return array_ops.unstack(values)
    else:
      with ops.device(tensors[0].device):
        sizes = array_ops.stack(
            [array_ops.shape(tensor)[0] for tensor in tensors])
        values = array_ops.concat(tensors, axis=0)
      with ops.device(device):
        sizes = array_ops.unstack(sizes)
