Closed Glaadiss closed 1 year ago
Yea i'm finding this really strange too . have you figure out the problem? is this code wrong?
I implemented the architecture in the way it's described in the paper, so I'll try to create PR fixing that in my free time.
According to the offical code of the paper: https://github.com/ozan-oktay/Attention-Gated-Networks the gating signal is mainly:
nn.Sequential(nn.Conv3d(in_size, out_size, kernel_size, (1,1,1), (0,0,0)),
nn.BatchNorm3d(out_size),
nn.ReLU(inplace=True),
)
And then input into Attention Gate, in order to match the size of encoding layer, we need to do upsampling of the output of gating signal. Therefore, this version just minus the one conv which called gating sigal. I think it is not necessary but can reduce a lot of calculations. I will make a compare when I am free.
Yes, I was also going through the attention Unet code, they are not in coherence with paper
The gating signal channel dimension should be double of skipping and the feature map should be halved. But here It is implemented in a different way
yeah, an ye yi yang
Hey, in this paper https://arxiv.org/pdf/1804.03999.pdf and other tutorials the attention gate takes the gating signal from the same block that is being unsampled in the next step, whereas in the code in this repo the gating signal comes from the block, which is already unsampled. Is this correct and I'm missing something, or this is a mistake?
how it is now:
how it should be based on the paper: