ssd.pytorch
ssd.pytorch copied to clipboard
solution to pytorch==0.4
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()
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