def _calc_shape(original_shape, stride, kernel_size):
    """
    Helper function that calculate image height and width after convolution.
    """
    shape = [(original_shape[0] - kernel_size) // stride + 1,
             (original_shape[1] - kernel_size) // stride + 1]

    return shape