We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I reduce the anchor number from 3 to 2, and there is a problem during training (evaluation):
anchor_boxes[:, :, :, :2] = ((r[:, :, :, :2].sigmoid() * 2. - 0.5) + grid) * stride
RuntimeError: The size of tensor a (2) must match the size of tensor b (3) at non-singleton dimension 3
The model configure is:
[model-configure] pre_weights=None classes=7 width=320 height=320 anchor_num=2 anchors=10.54,9.51, 45.60,40.45, 119.62,95.06, 253.71,138.37
The text was updated successfully, but these errors were encountered:
Solve the problem.
In utils/utils.py:
line 300 : from return torch.stack((wv, hv), 2).repeat(1,1,3).reshape(h, w, cfg["anchor_num"], -1).to(device) to return torch.stack((wv, hv), 2).repeat(1,1,cfg["anchor_num"]).reshape(h, w, cfg["anchor_num"], -1).to(device)
line 326: from c = c.repeat(1, 1, 3, 1) to c = c.repeat(1, 1, cfg["anchor_num"], 1)
Sorry, something went wrong.
No branches or pull requests
I reduce the anchor number from 3 to 2, and there is a problem during training (evaluation):
RuntimeError: The size of tensor a (2) must match the size of tensor b (3) at non-singleton dimension 3
The model configure is:
[model-configure]
pre_weights=None
classes=7
width=320
height=320
anchor_num=2
anchors=10.54,9.51, 45.60,40.45, 119.62,95.06, 253.71,138.37
The text was updated successfully, but these errors were encountered: