(self, in_channels, out_channels)
| 32 | |
| 33 | class ConvBlock(nn.Module): |
| 34 | def __init__(self, in_channels, out_channels): |
| 35 | |
| 36 | super(ConvBlock, self).__init__() |
| 37 | |
| 38 | self.conv1 = nn.Conv2d( |
| 39 | in_channels=in_channels, |
| 40 | out_channels=out_channels, |
| 41 | kernel_size=(3, 3), |
| 42 | stride=(1, 1), |
| 43 | padding=(1, 1), |
| 44 | bias=False, |
| 45 | ) |
| 46 | |
| 47 | self.conv2 = nn.Conv2d( |
| 48 | in_channels=out_channels, |
| 49 | out_channels=out_channels, |
| 50 | kernel_size=(3, 3), |
| 51 | stride=(1, 1), |
| 52 | padding=(1, 1), |
| 53 | bias=False, |
| 54 | ) |
| 55 | |
| 56 | self.bn1 = nn.BatchNorm2d(out_channels) |
| 57 | self.bn2 = nn.BatchNorm2d(out_channels) |
| 58 | |
| 59 | self.init_weight() |
| 60 | |
| 61 | def init_weight(self): |
| 62 | init_layer(self.conv1) |
nothing calls this directly
no test coverage detected