yxlijun / DSFD.pytorch

DSFD implement with pytorch
167 stars 58 forks source link

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

Open mexiQQ opened 4 years ago

mexiQQ commented 4 years ago

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?