Closed deepernewbie closed 2 years ago
There is an issue in the
class Gblock(nn.Module): def __init__(self, in_channels, out_channels, groups): super(Gblock, self).__init__() self.conv0 = nn.Conv2d(in_channels, out_channels, kernel_size=3, padding=1, groups=groups) self.relu = nn.ReLU(inplace=True) self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=1, padding=0) def forward(self, x): x = self.conv0(x) x = self.relu(x) x = self.conv1(x) return x
the line self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=1, padding=0)
should be replaced with
self.conv1 = nn.Conv2d(out_channels, out_channels, kernel_size=1, padding=0)
for a general purpose Gblock since in_channels and out_channels does not need to be the same
There is an issue in the
the line self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=1, padding=0)
should be replaced with
self.conv1 = nn.Conv2d(out_channels, out_channels, kernel_size=1, padding=0)
for a general purpose Gblock since in_channels and out_channels does not need to be the same