Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TransformerLayer, TransformerBlock, C3TR modules #2333

Merged
merged 18 commits into from
Apr 1, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove a deprecated class
  • Loading branch information
dingyiwei committed Mar 1, 2021
commit 3a2b4034f5785be3489c6618ff0b2590e9f610ae
7 changes: 0 additions & 7 deletions models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,6 @@ def forward(self, x):
return x + self.cv2(self.cv1(x)) if self.add else self.cv2(self.cv1(x))


class BoT(Bottleneck):
def __init__(self, c1, c2, shortcut=True, g=1, e=0.5):
super().__init__(c1, c2, shortcut, g, e)
c_ = int(c2 * e)
self.cv2 = Transformer(c_, c2, 4)


class BottleneckCSP(nn.Module):
# CSP Bottleneck https://github.com/WongKinYiu/CrossStagePartialNetworks
def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ch_out, number, shortcut, groups, expansion
Expand Down