Open bolin12 opened 5 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 ??
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 ??
我也遇到同样的问题,兄弟你解决了吗?
`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