Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
0c52cc0106
|
@ -213,6 +213,7 @@ class Darknet(nn.Module):
|
||||||
# Fuse Conv2d + BatchNorm2d layers throughout model
|
# Fuse Conv2d + BatchNorm2d layers throughout model
|
||||||
fused_list = nn.ModuleList()
|
fused_list = nn.ModuleList()
|
||||||
for a in list(self.children())[0]:
|
for a in list(self.children())[0]:
|
||||||
|
if isinstance(a, nn.Sequential):
|
||||||
for i, b in enumerate(a):
|
for i, b in enumerate(a):
|
||||||
if isinstance(b, nn.modules.batchnorm.BatchNorm2d):
|
if isinstance(b, nn.modules.batchnorm.BatchNorm2d):
|
||||||
# fuse this bn layer with the previous conv2d layer
|
# fuse this bn layer with the previous conv2d layer
|
||||||
|
|
Loading…
Reference in New Issue