Skip to content

Commit

Permalink
Update yolo.py
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Oct 2, 2021
1 parent 6bdd8b7 commit d40cad5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions models/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ def _clip_augmented(self, y):
nl = self.model[-1].nl # number of detection layers (P3-P5)
n = sum(4 ** x for x in range(nl))

# small
# large
i = y[0].shape[1] // n
y[0] = y[0][:, i:]
y[0] = y[0][:, :-i]

# large
# small
i = (y[-1].shape[1] // n) * 4 ** (nl - 1)
y[-1] = y[-1][:, :-i]
y[-1] = y[-1][:, i:]

return y

Expand Down

0 comments on commit d40cad5

Please sign in to comment.