mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Fix stochastic depth working only with a shortcut
This commit is contained in:
parent
54a6cca27a
commit
ded1671483
@ -89,10 +89,11 @@ class LinearBottleneck(nn.Module):
|
||||
x = self.se(x)
|
||||
x = self.act_dw(x)
|
||||
x = self.conv_pwl(x)
|
||||
if self.drop_path is not None:
|
||||
x = self.drop_path(x)
|
||||
if self.use_shortcut:
|
||||
x[:, 0:self.in_channels] += shortcut
|
||||
if self.drop_path is not None:
|
||||
x = self.drop_path(x)
|
||||
|
||||
x[:, 0:self.in_channels] += shortcut
|
||||
return x
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user