(self, inchan, scale=1, batch_norm=False)
| 43 | """ |
| 44 | |
| 45 | def __init__(self, inchan, scale=1, batch_norm=False): |
| 46 | super().__init__() |
| 47 | self.inchan = inchan |
| 48 | self.batch_norm = batch_norm |
| 49 | s = math.sqrt(scale) |
| 50 | self.conv0 = NormedConv2d(self.inchan, self.inchan, 3, padding=1, scale=s) |
| 51 | self.conv1 = NormedConv2d(self.inchan, self.inchan, 3, padding=1, scale=s) |
| 52 | if self.batch_norm: |
| 53 | self.bn0 = nn.BatchNorm2d(self.inchan) |
| 54 | self.bn1 = nn.BatchNorm2d(self.inchan) |
| 55 | |
| 56 | def residual(self, x): |
| 57 | # inplace should be False for the first relu, so that it does not change the input, |
nothing calls this directly
no test coverage detected