amdegroot / ssd.pytorch

A PyTorch Implementation of Single Shot MultiBox Detector
MIT License
5.14k stars 1.74k forks source link

Problem during training #360

Open lzh19961031 opened 5 years ago

lzh19961031 commented 5 years ago

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'

yyx1107 commented 5 years ago

不太清楚,最好用中文路径

Y132om commented 5 years ago

我也遇到了同样的问题,请问你是怎么就解决的。这个貌似和路径没关系

lhn217 commented 4 years ago

同问