yqyao / SSD_Pytorch

support different SSDs and different scale test, support refineDet.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError in refine_multibox_loss.py

haochange opened this issue · comments

Epoch:17||epochiter:0/484||arm_L:10.0920 arm_C:0.1087|| odm_L:22.9429 odm_C:2.7685|| loss:35.9120||iteration time:0.5392 sec.||LR: 0.000100||eta:16:57:45
Epoch:17||epochiter:10/484||arm_L:8.9460 arm_C:0.0909|| odm_L:16.4385 odm_C:2.7501|| loss:28.2255||iteration time:1.1111 sec.||LR: 0.000100||eta:1 day, 10:57:05

Traceback (most recent call last):
File "train.py", line 334, in
main()
File "train.py", line 314, in main
gamma, end_epoch, cfg)
File "train.py", line 111, in train
output, targets, use_arm=True, filter_object=True)
File "/home/ubuntu/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/ubuntu/SSD_Pytorch/layers/modules/refine_multibox_loss.py", line 156, in forward
neg = idx_rank < num_neg.expand_as(idx_rank)
File "/home/ubuntu/lib/python3.6/site-packages/torch/tensor.py", line 302, in expand_as
return self.expand(tensor.size())
RuntimeError: The expanded size of the tensor (16320) must match the existing size (90) at non-singleton dimension 1

commented

your input don't have positive samples? Maybe it has bugs when your input have no pos. @haochange

your input don't have positive samples? Maybe it has bugs when your input have no pos. @haochange

THX