Skip to content

Commit

Permalink
Revert C3() change (#7172)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Mar 28, 2022
1 parent 1832264 commit ee77632
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ def forward(self, x):
return self.cv4(self.act(self.bn(torch.cat((y1, y2), 1))))


from models.experimental import CrossConv


class C3(nn.Module):
# CSP Bottleneck with 3 convolutions
def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ch_out, number, shortcut, groups, expansion
Expand All @@ -135,8 +132,8 @@ def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ch_out, nu
self.cv1 = Conv(c1, c_, 1, 1)
self.cv2 = Conv(c1, c_, 1, 1)
self.cv3 = Conv(2 * c_, c2, 1) # optional act=FReLU(c2)
# self.m = nn.Sequential(*(Bottleneck(c_, c_, shortcut, g, e=1.0) for _ in range(n)))
self.m = nn.Sequential(*(CrossConv(c_, c_, 3, 1, g, 1.0, shortcut) for _ in range(n)))
self.m = nn.Sequential(*(Bottleneck(c_, c_, shortcut, g, e=1.0) for _ in range(n)))
# self.m = nn.Sequential(*(CrossConv(c_, c_, 3, 1, g, 1.0, shortcut) for _ in range(n)))

def forward(self, x):
return self.cv3(torch.cat((self.m(self.cv1(x)), self.cv2(x)), 1))
Expand Down

0 comments on commit ee77632

Please sign in to comment.