def _make_value_divisible(value, factor, min_value=None):
    """
    It ensures that all layers have a channel number that is divisible by 8
    :param v: value to process
    :param factor: divisor
    :param min_value: new value always greater than the min_value
    :return: new value
    """
    if min_value is None:
        min_value = factor
    new_value = max(int(value + factor / 2) // factor * factor, min_value)
    if new_value < value * 0.9:
        new_value += factor
    return new_value