Open zsp1197 opened 6 years ago
change Hard Negative Mining in multibox_loss.py (line 101) from loss_c[pos] = 0 to loss_c[pos.view(-1, 1)] = 0 Then change loss_l /= N loss_c /= N in the same file to loss_l /= N.float() loss_c /= N.float()
loss_c[pos] = 0
loss_c[pos.view(-1, 1)] = 0
loss_l /= N loss_c /= N
loss_l /= N.float() loss_c /= N.float()
This is not an issue bug a comment.
Thank you!
thanks
why do we need to add .float()? whether in py2 or py3, it should be the same since loss_l is float
change Hard Negative Mining in multibox_loss.py (line 101) from
loss_c[pos] = 0
toloss_c[pos.view(-1, 1)] = 0
Then changeloss_l /= N loss_c /= N
in the same file toloss_l /= N.float() loss_c /= N.float()