(in_dim, reduction_dim, dil, separable)
| 247 | |
| 248 | |
| 249 | def dpc_conv(in_dim, reduction_dim, dil, separable): |
| 250 | if separable: |
| 251 | groups = reduction_dim |
| 252 | else: |
| 253 | groups = 1 |
| 254 | |
| 255 | return nn.Sequential( |
| 256 | nn.Conv2d(in_dim, reduction_dim, kernel_size=3, dilation=dil, |
| 257 | padding=dil, bias=False, groups=groups), |
| 258 | nn.BatchNorm2d(reduction_dim), |
| 259 | nn.ReLU(inplace=True) |
| 260 | ) |
| 261 | |
| 262 | |
| 263 | class DPC(nn.Module): |