def label_2_float(x, bits):
    """Convert integer numbers to float values

    Note: dtype conversion is not handled
    Args:
    -----
       x: data to be converted Tensor.long or int, any shape.
       bits: number of bits, int

    Return:
    -------
       tensor.float

    """
    return 2 * x / (2 ** bits - 1.) - 1.