Skip to content

Commit

Permalink
Best ultralytics#19 version
Browse files Browse the repository at this point in the history
  • Loading branch information
manole-alexandru committed May 1, 2023
1 parent 0d57b4d commit 5919f84
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,23 +852,23 @@ class Seg(nn.Module):
def __init__(self, in_channels):
super().__init__()
print('SEG in channels: ', in_channels)
self.cv1 = Conv(in_channels, 96, k=3)
self.cv1 = Conv(in_channels, 32, k=3)
self.cv11 = Conv(96, 32, k=3)
self.upsample = nn.Upsample(scale_factor=2, mode='nearest')
self.cv2 = Conv(192, 48, k=3)
self.cv3 = Conv(48, 16, k=3)
self.cv2 = Conv(64, 32, k=3)
self.cv3 = Conv(32, 16, k=3)
self.cv4 = Conv(16, 1, act=False)
self.relu = nn.ReLU()

# self.dropout_weak = nn.Dropout(0.25)
self.dropout_normal = nn.Dropout(0.5)
# self.sigmoid = nn.Sigmoid()

def forward(self, x, skipped_input):
# print('----entry shape', x.shape, '---\n')
x = self.cv1(x)
x = self.upsample(x)

x2 = self.cv11(skipped_input[0])
# Here you could use 2/1 96 - channels
x = torch.cat((x, skipped_input), 1)
x = torch.cat((x, x2), 1)

# print('----upsample shape', x.shape, '---\n')
x = self.cv2(x)
Expand Down

0 comments on commit 5919f84

Please sign in to comment.