Image Segmentation
Transformers
PyTorch
upernet
Inference Endpoints
test2 / tests /test_utils /test_make_divisible.py
mccaly's picture
Upload 660 files
b13b124
from mmseg.models.utils import make_divisible
def test_make_divisible():
# test with min_value = None
assert make_divisible(10, 4) == 12
assert make_divisible(9, 4) == 12
assert make_divisible(1, 4) == 4
# test with min_value = 8
assert make_divisible(10, 4, 8) == 12
assert make_divisible(9, 4, 8) == 12
assert make_divisible(1, 4, 8) == 8