import math


def _shapeinfer(h, w):
    """The shape infer for vgg16.
    
    Args:
        h: The height of input image.
        w: The width of input image.

    Returns:
        h: The height of output feature map.
        w: The width of output feature map.
    """
    # 5 for the five times downsampling.
    for _ in range(5):
        h = math.ceil(h / 2)
        w = math.ceil(w / 2)
    return h, w