question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in test on CPU

See original GitHub issue

Hi, when I run test_net.py on CPU (sans --cuda), I get:

load checkpoint ./ckpts/res101/pascal_voc/faster_rcnn_1_1_10021.pth
load model successfully!
CUDA Error: invalid argument, at line 147
CUDA Error: invalid argument, at line 154

followed by:

raceback (most recent call last):
  File "test_net.py", line 244, in <module>
    rois_label = fasterRCNN(im_data, im_info, gt_boxes, num_boxes)
  File "/home/mvm_dev11/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/mvm_dev11/faster-rcnn/lib/model/faster_rcnn/faster_rcnn.py", line 50, in forward
    rois, rpn_loss_cls, rpn_loss_bbox = self.RCNN_rpn(base_feat, im_info, gt_boxes, num_boxes)
  File "/home/mvm_dev11/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/mvm_dev11/faster-rcnn/lib/model/rpn/rpn.py", line 78, in forward
    im_info, cfg_key))
  File "/home/mvm_dev11/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/mvm_dev11/faster-rcnn/lib/model/rpn/proposal_layer.py", line 162, in forward
    output[i,:num_proposal,1:] = proposals_single
RuntimeError: dimension out of range (expected to be in range of [-1, 0], but got 1)

Upon checking, no proposals are being generated at all:

proposals_single: torch.Size([0])
num_proposal: 0
output: torch.Size([1, 300, 5])

I’m guessing it is because of the CUDA errors on top. But can’t find the source of these errors. Can someone help? Training and testing are both running fine on GPU.

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
Sucrancommented, Aug 7, 2018

@cbasavaraj this issue I met, and I solved it by change the cfg.USE_GPU_NMS to False, and you can use nms_cpu to replace nms_gpu, so actually this project can run on both gpu and cpu. I think this issue can be closed.

0reactions
ZacharyWang-007commented, Jun 5, 2019

don’t run it on cpu. i solve it by runing on gpu.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to test a computer motherboard and CPU for failures
The first thing to do is a visual check of the motherboard. A common cause of motherboard issues or failure is bulged or...
Read more >
How to Test a CPU - Techwalla
A faulty CPU can cause error messages in the testing program, or cause the computer to crash or reboot while testing. If you...
Read more >
Troubleshooting Memory Errors - MemTest86
Please be aware that not all errors reported by MemTest86 are due to bad memory. The test implicitly tests the CPU, L1 and...
Read more >
OCCT Error Detected: Meaning and Causes Behind This
The reason is that the temperatures of both the CPU and integrated card are bound to affect each other. Stress testing both components...
Read more >
OCCT shows errors in CPU stress tests : r/overclocking - Reddit
When I run OCCT 9.1.0 it occasionally shows errors like this: "CPU - 1 error(s) found on physical core #2 (Virtual core #4)"....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found