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

cuda version problem #146

Open bolin12 opened 5 years ago

bolin12 commented 5 years ago
the python code for non_maximum_suppression is about 2x slow
It is strongly recommended to build cython code: 
`cd model/utils/nms/; python3 build.py build_ext --inplace

`cd model/utils/nms/; python3 build.py build_ext --inplace''') ======user config======== {'caffe_pretrain': True, 'caffe_pretrain_path': 'checkpoints/vgg16_caffe.pth', 'data': 'voc', 'debug_file': '/tmp/debugf', 'env': 'fasterrcnn-caffe', 'epoch': 14, 'load_path': None, 'lr': 0.001, 'lr_decay': 0.1, 'max_size': 1000, 'min_size': 600, 'num_workers': 8, 'plot_every': 100, 'port': 8097, 'pretrained_model': 'vgg16', 'roi_sigma': 1.0, 'rpn_sigma': 3.0, 'test_num': 10000, 'test_num_workers': 8, 'use_adam': False, 'use_chainer': False, 'use_drop': False, 'voc_data_dir': '/home/lbl/work/code/simple-faster-rcnn-pytorch-master/VOCdevkit/VOC2007', 'weight_decay': 0.0005} ==========end============ load data Traceback (most recent call last): File "train.py", line 132, in fire.Fire() File "/home/lbl/anaconda3/envs/env/lib/python3.7/site-packages/fire/core.py", line 138, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/home/lbl/anaconda3/envs/env/lib/python3.7/site-packages/fire/core.py", line 471, in _Fire target=component.name) File "/home/lbl/anaconda3/envs/env/lib/python3.7/site-packages/fire/core.py", line 675, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "train.py", line 67, in train faster_rcnn = FasterRCNNVGG16() File "/home/lbl/work/code/simple-faster-rcnn-pytorch-master/model/faster_rcnn_vgg16.py", line 76, in init classifier=classifier File "/home/lbl/work/code/simple-faster-rcnn-pytorch-master/model/faster_rcnn_vgg16.py", line 115, in init self.roi = RoIPooling2D(self.roi_size, self.roi_size, self.spatial_scale) File "/home/lbl/work/code/simple-faster-rcnn-pytorch-master/model/roi_module.py", line 82, in init self.RoI = RoI(outh, outw, spatial_scale) File "/home/lbl/work/code/simple-faster-rcnn-pytorch-master/model/roi_module.py", line 31, in init self.forward_fn = load_kernel('roi_forward', kernel_forward) File "cupy/util.pyx", line 48, in cupy.util.memoize.decorator.ret File "cupy/cuda/device.pyx", line 25, in cupy.cuda.device.get_device_id File "cupy/cuda/runtime.pyx", line 173, in cupy.cuda.runtime.getDevice File "cupy/cuda/runtime.pyx", line 145, in cupy.cuda.runtime.check_status cupy.cuda.runtime.CUDARuntimeError: cudaErrorInsufficientDriver: CUDA driver version is insufficient for CUDA runtime version

If you suspect this is an IPython bug, please report it at: https://github.com/ipython/ipython/issues or send an email to the mailing list at ipython-dev@python.org

You can print a more detailed traceback right now with "%tb", or use "%debug" to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via: %config Application.verbose_crash=True

guoshuhong commented 5 years ago

解决了吗,我也遇到这个问题

HwaiHo-0552 commented 3 years ago

I changed the pytorch version to V1.0&CUDA9.0 from V1.5&CUDA10.0, then solve this problem. However, there is another problem. when training the Faster RCNN (Pytorch V1.0&CUDA 9.0), ERROR comes as shown ' AttributeError: module 'cupy' has no attribute 'util' ', so I modified the source code. ( i.e. @cupy.util.memoize(for_each_device=True) ------>> cupy.memoize (for_each_device=True) .OR. @cupy.memoize(for_each_device=True). It still does not work, showing ' TypeError: Implicit conversion to a NumPy array is not allowed. Please use .get() to construct a NumPy array explicitly. ' How to solve this problem ??

zuojiale commented 3 years ago

I changed the pytorch version to V1.0&CUDA9.0 from V1.5&CUDA10.0, then solve this problem. However, there is another problem. when training the Faster RCNN (Pytorch V1.0&CUDA 9.0), ERROR comes as shown ' AttributeError: module 'cupy' has no attribute 'util' ', so I modified the source code. ( i.e. @cupy.util.memoize(for_each_device=True) ------>> cupy.memoize (for_each_device=True) .OR. @cupy.memoize(for_each_device=True). It still does not work, showing ' TypeError: Implicit conversion to a NumPy array is not allowed. Please use .get() to construct a NumPy array explicitly. ' How to solve this problem ??

我也遇到同样的问题,兄弟你解决了吗?