Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions models_vovnet/vovnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,18 @@ def __init__(self,
OrderedDict(conv1x1(in_channel, concat_ch, module_name, 'concat')))

def forward(self, x):
identity_feat = x
output = []
output.append(x)
output = [x]
for layer in self.layers:
x = layer(x)
output.append(x)

x = torch.cat(output, dim=1)
xt = self.concat(x)
x = self.concat(x)

if self.identity:
xt = xt + identity_feat
x = x + output[0]

return xt
return x


class _OSA_stage(nn.Sequential):
Expand Down Expand Up @@ -221,4 +219,4 @@ def vovnet27_slim(pretrained=False, progress=True, **kwargs):
progress (bool): If True, displays a progress bar of the download to stderr
"""
return _vovnet('vovnet27_slim', [64, 80, 96, 112], [128, 256, 384, 512],
[1,1,1,1], 5, pretrained, progress, **kwargs)
[1,1,1,1], 5, pretrained, progress, **kwargs)