Merge pull request #325 from likyoo/master

delete convolution bias before BN

Former-commit-id: 0921374ee4ed02688ef5ed48c50b241ee8911069
This commit is contained in:
milesial 2021-12-13 12:02:03 +01:00 committed by GitHub
commit c1f4757c32

View file

@ -13,10 +13,10 @@ class DoubleConv(nn.Module):
if not mid_channels:
mid_channels = out_channels
self.double_conv = nn.Sequential(
nn.Conv2d(in_channels, mid_channels, kernel_size=3, padding=1),
nn.Conv2d(in_channels, mid_channels, kernel_size=3, padding=1, bias=False),
nn.BatchNorm2d(mid_channels),
nn.ReLU(inplace=True),
nn.Conv2d(mid_channels, out_channels, kernel_size=3, padding=1),
nn.Conv2d(mid_channels, out_channels, kernel_size=3, padding=1, bias=False),
nn.BatchNorm2d(out_channels),
nn.ReLU(inplace=True)
)