Method
__init__
(self,
in_channels,
out_channels,
with_cp=False,
norm_cfg=dict(type='BN'),
act_cfg=dict(type='ReLU'),
*,
conv_cfg=None,
conv_first=False,
kernel_size=1,
stride=1,
padding=0,
upsample_cfg=dict(
scale_factor=2, mode='bilinear', align_corners=False))
Source from the content-addressed store, hash-verified
| 180 | """ |
| 181 | |
| 182 | def __init__(self, |
| 183 | in_channels, |
| 184 | out_channels, |
| 185 | with_cp=False, |
| 186 | norm_cfg=dict(type='BN'), |
| 187 | act_cfg=dict(type='ReLU'), |
| 188 | *, |
| 189 | conv_cfg=None, |
| 190 | conv_first=False, |
| 191 | kernel_size=1, |
| 192 | stride=1, |
| 193 | padding=0, |
| 194 | upsample_cfg=dict( |
| 195 | scale_factor=2, mode='bilinear', align_corners=False)): |
| 196 | super(InterpConv, self).__init__() |
| 197 | |
| 198 | self.with_cp = with_cp |
| 199 | conv = ConvModule( |
| 200 | in_channels, |
| 201 | out_channels, |
| 202 | kernel_size=kernel_size, |
| 203 | stride=stride, |
| 204 | padding=padding, |
| 205 | conv_cfg=conv_cfg, |
| 206 | norm_cfg=norm_cfg, |
| 207 | act_cfg=act_cfg) |
| 208 | upsample = Upsample(**upsample_cfg) |
| 209 | if conv_first: |
| 210 | self.interp_upsample = nn.Sequential(conv, upsample) |
| 211 | else: |
| 212 | self.interp_upsample = nn.Sequential(upsample, conv) |
| 213 | |
| 214 | def forward(self, x): |
| 215 | """Forward function.""" |
Callers
nothing calls this directly
Tested by
no test coverage detected