IndexError: index 309 is out of bounds for axis 1 with size 309
Closed this issue · 2 comments
$ python main.py
/home1/ll/object_detect/YOLO3D_pytorch/region_loss.py:216: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
loss = loss_x + loss_y + loss_w + loss_l + loss_conf + loss_cls + loss_Euler + torch.tensor(loss_iou).cuda()
Traceback (most recent call last):
File "main.py", line 69, in
loss = region_loss(output,target, loss_history, epoch, batch_idx)
File "/home/ll/workspace/tensorflow_env/pytorch-py2.7/local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home1/ll/object_detect/YOLO3D_pytorch/region_loss.py", line 217, in forward
loss_history[epoch, batch_idx, :] = [loss_x, loss_y, loss_w, loss_l, loss_conf, loss_cls, loss_Euler, loss_iou]
IndexError: index 309 is out of bounds for axis 1 with size 309