Skip to content
New issue

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

RuntimeError: Value cannot be converted to type float without overflow: inf #26

Open
mexiQQ opened this issue Oct 19, 2019 · 0 comments

Comments

@mexiQQ
Copy link

mexiQQ commented Oct 19, 2019

Traceback (most recent call last):
File "train.py", line 257, in
train()
File "train.py", line 173, in train
loss_l_pa1l, loss_c_pal1 = criterion(out[:3], targets)
File "/home/ubuntu/anaconda3/envs/pytorch_p27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 325, in call
result = self.forward(*input, **kwargs)
File "/home/ubuntu/DSFD.pytorch/layers/modules/multibox_loss.py", line 95, in forward
loss_c = log_sum_exp(batch_conf) -
File "/home/ubuntu/DSFD.pytorch/layers/bbox_utils.py", line 240, in log_sum_exp
return torch.log(torch.sum(torch.exp(x - x_max), 1, keepdim=True)) + x_max
RuntimeError: value cannot be converted to type float without overflow: inf

Can anyone help me fix this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant