Code Duplication    Length = 22-23 lines in 3 locations

test/unit/test_backbone_local_net.py 1 location

@@ 89-111 (lines=23) @@
86
        output = network.call(inputs)
87
        assert inputs.shape == output.shape
88
89
    def test_get_config(self):
90
        config = dict(
91
            image_size=(4, 5, 6),
92
            out_channels=3,
93
            num_channel_initial=2,
94
            depth=2,
95
            extract_levels=(0, 1),
96
            out_kernel_initializer="he_normal",
97
            out_activation="softmax",
98
            pooling=False,
99
            concat_skip=False,
100
            use_additive_upsampling=True,
101
            encode_kernel_sizes=[7, 3, 3],
102
            decode_kernel_sizes=3,
103
            encode_num_channels=(2, 4, 8),
104
            decode_num_channels=(2, 4, 8),
105
            strides=2,
106
            padding="same",
107
            name="Test",
108
        )
109
        network = LocalNet(**config)
110
        got = network.get_config()
111
        assert got == config
112

test/unit/test_backbone_unet.py 1 location

@@ 113-134 (lines=22) @@
110
        output = network.call(inputs)
111
        assert inputs.shape == output.shape
112
113
    def test_get_config(self):
114
        config = dict(
115
            image_size=(4, 5, 6),
116
            out_channels=3,
117
            num_channel_initial=2,
118
            depth=2,
119
            extract_levels=(0, 1),
120
            out_kernel_initializer="he_normal",
121
            out_activation="softmax",
122
            pooling=False,
123
            concat_skip=False,
124
            encode_kernel_sizes=3,
125
            decode_kernel_sizes=3,
126
            encode_num_channels=(2, 4, 8),
127
            decode_num_channels=(2, 4, 8),
128
            strides=2,
129
            padding="same",
130
            name="Test",
131
        )
132
        network = UNet(**config)
133
        got = network.get_config()
134
        assert got == config
135

test/unit/test_backbone_global_net.py 1 location

@@ 73-94 (lines=22) @@
70
        assert ddf.shape == inputs.shape
71
        assert theta.shape == (batch_size, 4, 3)
72
73
    def test_get_config(self):
74
        config = dict(
75
            image_size=(4, 5, 6),
76
            out_channels=3,
77
            num_channel_initial=2,
78
            depth=2,
79
            extract_levels=(2,),
80
            out_kernel_initializer="he_normal",
81
            out_activation="softmax",
82
            pooling=False,
83
            concat_skip=False,
84
            encode_kernel_sizes=[7, 3, 3],
85
            decode_kernel_sizes=3,
86
            encode_num_channels=[2, 4, 8],
87
            decode_num_channels=[2, 4, 8],
88
            strides=2,
89
            padding="same",
90
            name="Test",
91
        )
92
        network = GlobalNet(**config)
93
        got = network.get_config()
94
        assert got == config
95