def batch_axis(input_shape):
    """Get the batch axis entry of an input shape.

    Parameters
    ----------
    input_shape : tuple
        The data shape related to dataset.

    Returns
    -------
    axis : int
        The batch axis entry of an input shape.
    """
    idx = [i for i, s in enumerate(input_shape) if s == -1]
    assert len(idx) == 1
    return idx[0]