Fix stochastic depth working only with a shortcut

pull/685/head
Dongyoon Han 3 years ago
parent 54a6cca27a
commit ded1671483

@ -89,9 +89,10 @@ class LinearBottleneck(nn.Module):
x = self.se(x) x = self.se(x)
x = self.act_dw(x) x = self.act_dw(x)
x = self.conv_pwl(x) x = self.conv_pwl(x)
if self.use_shortcut:
if self.drop_path is not None: if self.drop_path is not None:
x = self.drop_path(x) x = self.drop_path(x)
if self.use_shortcut:
x[:, 0:self.in_channels] += shortcut x[:, 0:self.in_channels] += shortcut
return x return x

Loading…
Cancel
Save