When I want to train my own data, I meet a problem
Traceback (most recent call last):
File "train.py", line 260, in
train()
File "train.py", line 183, in train
loss_l, loss_c = criterion(out, targets)
File "/home/pku/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/pku/毕设/ssd.pytorch-master/layers/modules/multibox_loss.py", line 74, in forward
loc_t, conf_t, idx)
File "/home/pku/毕设/ssd.pytorch-master/layers/box_utils.py", line 93, in match
point_form(priors)
File "/home/pku/毕设/ssd.pytorch-master/layers/box_utils.py", line 64, in jaccard
inter = intersect(box_a, box_b)
File "/home/pku/毕设/ssd.pytorch-master/layers/box_utils.py", line 45, in intersect
box_b[:, 2:].unsqueeze(0).expand(A, B, 2))
RuntimeError: Expected object of scalar type Double but got scalar type Float for argument #2 'other'
When I want to train my own data, I meet a problem Traceback (most recent call last): File "train.py", line 260, in
train()
File "train.py", line 183, in train
loss_l, loss_c = criterion(out, targets)
File "/home/pku/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/pku/毕设/ssd.pytorch-master/layers/modules/multibox_loss.py", line 74, in forward
loc_t, conf_t, idx)
File "/home/pku/毕设/ssd.pytorch-master/layers/box_utils.py", line 93, in match
point_form(priors)
File "/home/pku/毕设/ssd.pytorch-master/layers/box_utils.py", line 64, in jaccard
inter = intersect(box_a, box_b)
File "/home/pku/毕设/ssd.pytorch-master/layers/box_utils.py", line 45, in intersect
box_b[:, 2:].unsqueeze(0).expand(A, B, 2))
RuntimeError: Expected object of scalar type Double but got scalar type Float for argument #2 'other'