microsoft / ProDA

Prototypical Pseudo Label Denoising and Target Structure Learning for Domain Adaptive Semantic Segmentation (CVPR 2021)
https://arxiv.org/abs/2101.10979
MIT License
286 stars 44 forks source link

deeplabv2.py code problem #33

Closed engine210 closed 3 years ago

engine210 commented 3 years ago

Hi, I'm curious about a line of code in deeplabv2.py https://github.com/microsoft/ProDA/blob/9ba80c7dbbd23ba1a126e3f4003a72f27d121a1f/models/deeplabv2.py#L123 It seems like return out has an extra indent which makes for loop useless. Or does it has some purpose?

    def forward(self, x):
        out = self.conv2d_list[0](x)
        for i in range(len(self.conv2d_list) - 1):
            out += self.conv2d_list[i + 1](x)
            return out
panzhang0104 commented 3 years ago

The code of the model is borrowed from seg-Uncertainty. For the reason, please refer to https://github.com/microsoft/ProDA/issues/2#issuecomment-818481201