check_anchor_order() update

This commit is contained in:
Glenn Jocher committed 2020-06-21 14:08:59 -07:00
1 parent 1f1917ef56
commit fc171e2678
2 files changed
+15 -2

No files matched your search

+2 -1
View File
@@ -61,8 +61,9 @@ class Model(nn.Module):
# Build strides, anchors
m = self.model[-1] # Detect()
m.stride = torch.tensor([64 / x.shape[-2] for x in self.forward(torch.zeros(1, ch, 64, 64))]) # forward
m.stride = torch.tensor([128 / x.shape[-2] for x in self.forward(torch.zeros(1, ch, 128, 128))]) # forward
m.anchors /= m.stride.view(-1, 1, 1)
check_anchor_order(m)
self.stride = m.stride
# Init weights, biases