def nf(stage, fmap_base=8192, fmap_decay=1.7, fmap_max=32, fmap_min: int = 32):
    """Computes the number of feature map given the current stage.

    This function is inspired from the following Github repo:
    https://github.com/tkarras/progressive_growing_of_gans/blob/master/networks.py

    Arguments:
        stage:
            Integer
    Returns:
        Integer, which is the number of feature map wanted at this stage.
    """
    return min(
        max(int(fmap_base / (2.0 ** (stage * fmap_decay))), fmap_min), fmap_max
    )