Init. Args: features (int): number of features
(self, features, activation, bn)
| 233 | """ |
| 234 | |
| 235 | def __init__(self, features, activation, bn): |
| 236 | """Init. |
| 237 | |
| 238 | Args: |
| 239 | features (int): number of features |
| 240 | """ |
| 241 | super().__init__() |
| 242 | |
| 243 | self.bn = bn |
| 244 | |
| 245 | self.groups=1 |
| 246 | |
| 247 | self.conv1 = nn.Conv2d( |
| 248 | features, features, kernel_size=3, stride=1, padding=1, bias=True, groups=self.groups |
| 249 | ) |
| 250 | |
| 251 | self.conv2 = nn.Conv2d( |
| 252 | features, features, kernel_size=3, stride=1, padding=1, bias=True, groups=self.groups |
| 253 | ) |
| 254 | |
| 255 | if self.bn==True: |
| 256 | self.bn1 = nn.BatchNorm2d(features) |
| 257 | self.bn2 = nn.BatchNorm2d(features) |
| 258 | |
| 259 | self.activation = activation |
| 260 | |
| 261 | self.skip_add = nn.quantized.FloatFunctional() |
| 262 | |
| 263 | def forward(self, x): |
| 264 | """Forward pass. |