chenyuntc / simple-faster-rcnn-pytorch

A simplified implemention of Faster R-CNN that replicate performance from origin paper
Other
3.99k stars 1.14k forks source link

cupy cuda error #33

Open yangshao opened 6 years ago

yangshao commented 6 years ago

when i try to train on voc, i come across this error: from collections import namedtuple faster_rcnn = FasterRCNNVGG16() File "/home/yangshao/workspace/faster_rcnn/model/faster_rcnn_vgg16.py", line 51, in init head = VGG16RoIHead(n_class=n_fg_class+1,roi_size=7, spatial_scale=1./self.feat_stride, classifier=classifier) File "/home/yangshao/workspace/faster_rcnn/model/faster_rcnn_vgg16.py", line 29, in init self.roi = RoIPooling2D(self.roi_size, self.roi_size, self.spatial_scale) File "/home/yangshao/workspace/faster_rcnn/model/roi_module.py", line 86, in init self.RoI = RoI(outh, outw, spatial_scale) File "/home/yangshao/workspace/faster_rcnn/model/roi_module.py", line 35, in init self.forward_fn = load_kernel('roi_forward', kernel_forward) File "cupy/util.pyx", line 34, in cupy.util.memoize.decorator.ret File "cupy/cuda/device.pyx", line 19, in cupy.cuda.device.get_device_id File "cupy/cuda/runtime.pyx", line 164, in cupy.cuda.runtime.getDevice File "cupy/cuda/runtime.pyx", line 136, in cupy.cuda.runtime.check_status cupy.cuda.runtime.CUDARuntimeError: cudaErrorNoDevice: no CUDA-capable device is detected

I installed cupy with command: pip install cupy-cuda80

bobo0810 commented 6 years ago

I think you should try it :import cupy. See if successful?

yangshao commented 6 years ago

@bobo0810 this command succeeds and i can use pytorch(gpu version) to run other programs.

yangshao commented 6 years ago

finally, I replaced with cupy version of roi pooling with this version: https://github.com/longcw/faster_rcnn_pytorch and I can run it......