Skip to content

Commit def23b7

Browse files
committed
Add manet test
1 parent df7129b commit def23b7

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/models/test_manet.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
1+
import segmentation_models_pytorch as smp
2+
13
from tests.models import base
24

35

46
class TestManetModel(base.BaseModelTester):
57
test_model_type = "manet"
68
files_for_diff = [r"decoders/manet/", r"base/"]
9+
10+
def test_interpolation(self):
11+
# test bilinear
12+
model_1 = smp.create_model(
13+
self.test_model_type,
14+
self.test_encoder_name,
15+
decoder_interpolation="bilinear",
16+
)
17+
for block in model_1.decoder.blocks:
18+
assert block.interpolation_mode == "bilinear"
19+
20+
# test bicubic
21+
model_2 = smp.create_model(
22+
self.test_model_type,
23+
self.test_encoder_name,
24+
decoder_interpolation="bicubic",
25+
)
26+
for block in model_2.decoder.blocks:
27+
assert block.interpolation_mode == "bicubic"

0 commit comments

Comments
 (0)