TypeError in refine_multibox_loss.py. maybe a bug
haochange opened this issue · 4 comments
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 154, in forward
max=pos.size(1) - 1)
TypeError: clamp(): argument 'input' (position 1) must be Tensor, not int
I have updated some codes to solve this problem. @haochange
I have updated some codes to solve this problem. @haochange
Thank you so much!
when I run the code with my own dataset, It still have some problem:
in this line:
neg = idx_rank < num_neg.expand_as(idx_rank)
It shows that: "RuntimeError: The expanded size of the tensor (2) must match the existing size (32) at non-singleton dimension"
@PCML-WangZhe Do you solve the problem? I meet the same problem