Init. Args: features (int): number of features
(self, features, activation, deconv=False, bn=False, expand=False, align_corners=True)
| 293 | """ |
| 294 | |
| 295 | def __init__(self, features, activation, deconv=False, bn=False, expand=False, align_corners=True): |
| 296 | """Init. |
| 297 | |
| 298 | Args: |
| 299 | features (int): number of features |
| 300 | """ |
| 301 | super(FeatureFusionBlock_custom, self).__init__() |
| 302 | |
| 303 | self.deconv = deconv |
| 304 | self.align_corners = align_corners |
| 305 | |
| 306 | self.groups=1 |
| 307 | |
| 308 | self.expand = expand |
| 309 | out_features = features |
| 310 | if self.expand==True: |
| 311 | out_features = features//2 |
| 312 | |
| 313 | self.out_conv = nn.Conv2d(features, out_features, kernel_size=1, stride=1, padding=0, bias=True, groups=1) |
| 314 | |
| 315 | self.resConfUnit1 = ResidualConvUnit_custom(features, activation, bn) |
| 316 | self.resConfUnit2 = ResidualConvUnit_custom(features, activation, bn) |
| 317 | |
| 318 | self.skip_add = nn.quantized.FloatFunctional() |
| 319 | |
| 320 | def forward(self, *xs): |
| 321 | """Forward pass. |
nothing calls this directly
no test coverage detected