Asymmetrical UpSample Block. Args: in_channels (int): Input channels of the block. out_channels (int): Output channels of the block. norm_cfg (:obj:`ConfigDict` or dict): Config dict for normalization layer. act_cfg (:obj:`ConfigDict` or dict): Co
| 219 | |
| 220 | |
| 221 | class AsymmeUpBlock(BaseModule): |
| 222 | """Asymmetrical UpSample Block. |
| 223 | |
| 224 | Args: |
| 225 | in_channels (int): Input channels of the block. |
| 226 | out_channels (int): Output channels of the block. |
| 227 | norm_cfg (:obj:`ConfigDict` or dict): Config dict for |
| 228 | normalization layer. |
| 229 | act_cfg (:obj:`ConfigDict` or dict): Config dict of activation layers. |
| 230 | Defaults to dict(type='LeakyReLU'). |
| 231 | indice_key (str, optional): Name of indice tables. Defaults to None. |
| 232 | up_key (str, optional): Name of indice tables used in |
| 233 | SparseInverseConv3d. Defaults to None. |
| 234 | """ |
| 235 | |
| 236 | def __init__(self, |
| 237 | in_channels: int, |
| 238 | out_channels: int, |
| 239 | norm_cfg: ConfigType, |
| 240 | act_cfg: ConfigType = dict(type='LeakyReLU'), |
| 241 | indice_key: Optional[str] = None, |
| 242 | up_key: Optional[str] = None): |
| 243 | super().__init__() |
| 244 | |
| 245 | self.trans_conv = SubMConv3d( |
| 246 | in_channels, |
| 247 | out_channels, |
| 248 | kernel_size=(3, 3, 3), |
| 249 | padding=1, |
| 250 | bias=False, |
| 251 | indice_key=indice_key + 'new_up') |
| 252 | self.trans_act = build_activation_layer(act_cfg) |
| 253 | self.trans_bn = build_norm_layer(norm_cfg, out_channels)[1] |
| 254 | |
| 255 | self.conv1 = SubMConv3d( |
| 256 | out_channels, |
| 257 | out_channels, |
| 258 | kernel_size=(1, 3, 3), |
| 259 | padding=1, |
| 260 | bias=False, |
| 261 | indice_key=indice_key) |
| 262 | self.act1 = build_activation_layer(act_cfg) |
| 263 | self.bn1 = build_norm_layer(norm_cfg, out_channels)[1] |
| 264 | |
| 265 | self.conv2 = SubMConv3d( |
| 266 | out_channels, |
| 267 | out_channels, |
| 268 | kernel_size=(3, 1, 3), |
| 269 | padding=1, |
| 270 | bias=False, |
| 271 | indice_key=indice_key) |
| 272 | self.act2 = build_activation_layer(act_cfg) |
| 273 | self.bn2 = build_norm_layer(norm_cfg, out_channels)[1] |
| 274 | |
| 275 | self.conv3 = SubMConv3d( |
| 276 | out_channels, |
| 277 | out_channels, |
| 278 | kernel_size=(3, 3, 3), |