HiLab-git / SSL4MIS

Semi Supervised Learning for Medical Image Segmentation, a collection of literature reviews and code implementations.
MIT License
2.19k stars 387 forks source link

A bug about the UpBlock of the UNet #42

Closed szhang963 closed 2 years ago

szhang963 commented 2 years ago

The class UpBlock is defined as:

class UpBlock(nn.Module):
    """Upssampling followed by ConvBlock"""

    def __init__(self, in_channels1, in_channels2, out_channels, dropout_p,
                 bilinear=True):

, where the default value of bilinear is "True". However, the real value of bilinear is not fed into the UpBlock class, as follows:

self.up1 = UpBlock(
    self.ft_chns[4], self.ft_chns[3], self.ft_chns[3], dropout_p=0.0)

Therefore, the 'nn.Upsample' is always selected in the UpBlock. You can check whether the bug exists or not.

Luoxd1996 commented 2 years ago

Hi, Thanks for your suggestion, actually, these codes of networks are borrowed from some famous and open-access implementations. So, I will check it carefully later, thanks again. Best, Xiangde.