# down sampling
# 假如输入 224*224*1 的图像
# H = ((224 - 3 + 1 + 2 - 1) / 1) + 1 = 224 unet的卷积不会改变特征图的大小
self.conv1 = DoubleConv(in_ch, 64)
# to increase the dimensions
self.w1 = nn.Conv2d(in_ch, 64, kernel_size=1, padding=0, stride=1)
self.pool1 = nn.MaxPool2d(2) # 224 -> 112
self.conv2 = DoubleConv(64, 128) # 不变
# to increase the dimensions
self.w2 = nn.Conv2d(64, 128, kernel_size=1, padding=0, stride=1)
self.pool2 = nn.MaxPool2d(2) # 56
self.conv3 = DoubleConv(128, 256)
# to increase the dimensions
self.w3 = nn.Conv2d(128, 256, kernel_size=1, padding=0, stride=1)
self.pool3 = nn.MaxPool2d(2) # 28
self.conv4 = DoubleConv(256, 512)
# to increase the dimensions
self.w4 = nn.Conv2d(256, 512, kernel_size=1, padding=0, stride=1)
self.pool4 = nn.MaxPool2d(2) # 14
self.conv5 =
【干货教学】unet进阶,如何在unet中加入resnet(残差连接)_resnet unet(1)
最新推荐文章于 2024-08-06 10:36:51 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)