LeeJunHyun / Image_Segmentation

Pytorch implementation of U-Net, R2U-Net, Attention U-Net, and Attention R2U-Net.
2.66k stars 594 forks source link

No ConvTranspose layer in your code? #65

Closed 1hell0the1others8 closed 1 year ago

1hell0the1others8 commented 3 years ago

Hello, I found that there is ConvTrans layer in your network architecture. But i can not find ConvTranspose layer in the code you supported. Could you solve my confusion? Thank you!

class up_conv(nn.Module): def init(self,ch_in,ch_out): super(up_conv,self).init() self.up = nn.Sequential( nn.Upsample(scale_factor=2), nn.Conv2d(ch_in,ch_out,kernel_size=3,stride=1,padding=1,bias=True), nn.BatchNorm2d(ch_out), nn.ReLU(inplace=True) )

def forward(self,x):
    x = self.up(x)
    return x
fengbear commented 3 years ago

Upsample