Fix two regressions

This commit is contained in:
Ross Wightman 2020-06-05 11:04:51 -07:00
parent a7e8cadd15
commit 4ddde1d3a4
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ from .create_act import get_act_fn
class SEModule(nn.Module):
def __init__(self, channels, reduction=16, act_layer=nn.ReLU, min_channels=8, reduction_channels=None,
gate_fn='hard_sigmoid'):
gate_fn='sigmoid'):
super(SEModule, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d(1)
reduction_channels = reduction_channels or max(channels // reduction, min_channels)

View File

@ -99,9 +99,9 @@ class Bottle2neck(nn.Module):
spx = torch.split(out, self.width, 1)
spo = []
sp = spx[0]
sp = spx[0] # redundant, for torchscript
for i, (conv, bn) in enumerate(zip(self.convs, self.bns)):
if self.is_first:
if i == 0 or self.is_first:
sp = spx[i]
else:
sp = sp + spx[i]