From b3bd282cc759fc2c053bab66184dc48ef7d07cad Mon Sep 17 00:00:00 2001 From: johnzja Date: Tue, 11 Aug 2020 20:18:05 +0800 Subject: [PATCH] add unit test for inverted_residual: debug 1 --- tests/test_ops/test_inverted_residual_module.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_ops/test_inverted_residual_module.py b/tests/test_ops/test_inverted_residual_module.py index a49210349..0e3d876e3 100644 --- a/tests/test_ops/test_inverted_residual_module.py +++ b/tests/test_ops/test_inverted_residual_module.py @@ -10,7 +10,7 @@ def test_inv_residual(): # test stride assertion. InvertedResidual(32, 32, 3, 4) - # test default config with res connection. + # test default config without res connection. # set expand_ratio = 4, stride = 1 and inp=oup. inv_module = InvertedResidual(32, 32, 1, 4) assert inv_module.use_res_connect @@ -18,8 +18,8 @@ def test_inv_residual(): assert inv_module.conv[0].padding == 0 assert inv_module.conv[1].kernel_size == (3, 3) assert inv_module.conv[1].padding == 1 - assert not inv_module.conv[0].with_norm - assert not inv_module.conv[1].with_norm + assert inv_module.conv[0].with_norm + assert inv_module.conv[1].with_norm x = torch.rand(1, 32, 64, 64) output = inv_module(x) assert output.shape == (1, 32, 64, 64)