Fix check_anchor_order() in pixel-space not grid-space (#7060)
* Update `check_anchor_order()` Use mean area per output layer for added stability. * Check in pixel-space not grid-space fix
This commit is contained in:
1 parent
529fbc1814
commit
f327eee614
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -110,8 +110,8 @@ class Model(nn.Module):
|
||||
s = 256 # 2x min stride
|
||||
m.inplace = self.inplace
|
||||
m.stride = torch.tensor([s / x.shape[-2] for x in self.forward(torch.zeros(1, ch, s, s))]) # forward
|
||||
check_anchor_order(m) # must be in pixel-space (not grid-space)
|
||||
m.anchors /= m.stride.view(-1, 1, 1)
|
||||
check_anchor_order(m)
|
||||
self.stride = m.stride
|
||||
self._initialize_biases() # only run once
|
||||
|
||||
|
||||
Reference in new issue
Block a user