Skip to content

what can I do for RuntimeError: Trying to create tensor with negative dimension -1592267047: [-1592267047] #1688

@Jackyinuo

Description

@Jackyinuo

❔Question

Starting training for 300 epochs...

 Epoch   gpu_mem       box       obj       cls     total   targets  img_size
 0/299     5.73G   0.09355   0.08561   0.08285     0.262       154       640: 100%|██████████| 3697/3697 [37:33<00:00,  1.64it/s] 
           Class      Images     Targets           P           R      [email protected]  [email protected]:.95: 100%|██████████| 157/157 [01:31<00:00,  1.71it/s]

 Epoch   gpu_mem       box       obj       cls     total   targets  img_size
 1/299     6.98G   0.09522    0.1221   0.08584    0.3032       247       640: 100%|██████████| 3697/3697 [35:22<00:00,  1.74it/s]
           Class      Images     Targets           P           R      [email protected]  [email protected]:.95:   0%|          | 0/157 [00:00<?, ?it/s]

Analyzing anchors... anchors/target = 4.45, Best Possible Recall (BPR) = 0.9949
all 5e+03 3.63e+04 0.0145 0.00296 0.00248 0.000805
Traceback (most recent call last):
File "train.py", line 503, in
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 336, in train
results, maps, times = test.test(opt.data,
File "/disk1/huihui/yolov5/test.py", line 120, in test
output = non_max_suppression(inf_out, conf_thres=conf_thres, iou_thres=iou_thres, labels=lb)
File "/disk1/huihui/yolov5/utils/general.py", line 332, in non_max_suppression
i = torchvision.ops.nms(boxes, scores, iou_thres) # NMS
File "/home/phzhou/anaconda3/envs/pt1/lib/python3.8/site-packages/torchvision/ops/boxes.py", line 42, in nms
return torch.ops.torchvision.nms(boxes, scores, iou_threshold)
RuntimeError: Trying to create tensor with negative dimension -1592267047: [-1592267047]

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleStale and schedule for closing soonquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions