Skip to content

Commit

Permalink
Fixes to new conection
Browse files Browse the repository at this point in the history
  • Loading branch information
manole-alexandru committed Apr 21, 2023
1 parent 32b4908 commit 2aa857f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 5 additions & 1 deletion models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,19 +863,23 @@ def __init__(self, in_channels):
self.dropout_normal = nn.Dropout(0.5)
# self.sigmoid = nn.Sigmoid()

def forward(self, x):
def forward(self, x, new_x):
print('new x:', new_x.shape)
# print('----entry shape', x.shape, '---\n')
x = self.cv1(x)
x = self.upsample(x)
print('post unsample 1:', x.shape)
# x = self.relu(x)
# print('----upsample shape', x.shape, '---\n')
x = self.cv2(x)
x = self.upsample(x)
print('post unsample 2:', x.shape)

# x = self.relu(x)
# x = self.dropout_normal(x)
x = self.cv3(x)
x = self.upsample(x)
print('post unsample 3:', x.shape)
# print('----out shape', x.shape, '---\n')
# x = self.sigmoid(x)

Expand Down
5 changes: 2 additions & 3 deletions models/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,9 @@ def __init__(self, nc=80, anchors=(), ch=(), inplace=True):

def forward(self, x):
old_x = x[:3]
new_skip_connect_info = x[4]
print(new_skip_connect_info.shape)
new_skip_connect_info = x[3]
x = old_x
p = self.semantic_seg(x[0])
p = self.semantic_seg(x[0], new_skip_connect_info)
x = self.detect(self, x)
return (x, p) if self.training else (x[0], p) if self.export else (x[0], p, x[1])

Expand Down

0 comments on commit 2aa857f

Please sign in to comment.