Anaconda中安装Cascade RCNN(Detectron)的若干问题

安装参考https://github.com/zhaoweicai/Detectron-Cascade-RCNN/blob/master/INSTALL.md

 

 

1、对于在 python detectron/tests/test_spatial_narrow_as_op.py 时出现 AssertionError: Detectron ops lib not found; make sure that your Caffe2 version includes Detectron module

detectron/utils/env.py中第65行左右的:

ops_path = os.path.join(prefix, 'lib/libcaffe2_detectron_ops_gpu.so')

在conda的envs文件夹中搜索这个so,将整个get_detectron_ops_lib()的函数内容替换为 return "/home/wit/anaconda3/envs/xxx/lib/python2.7/site-packages/torch/lib/libcaffe2_detectron_ops_gpu.so"。

 

2、对于上述测试时出现

Detectron-Cascade-RCNN$ python detectron/tests/test_spatial_narrow_as_op.py
[E init_intrinsics_check.cc:43] CPU feature avx is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
terminate called after throwing an instance of 'c10::Error'
  what():  device_index >= 0 && device_index < num_gpus ASSERT FAILED at /opt/conda/conda-bld/pytorch-nightly_1553749764951/work/c10/cuda/CUDAStream.cpp:265, please report a bug to PyTorch. (check_gpu at /opt/conda/conda-bld/pytorch-nightly_1553749764951/work/c10/cuda/CUDAStream.cpp:265)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x45 (0x7fac18e21895 in /home/wit/anaconda3/envs/cascade/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libc10.so)
frame #1: c10::cuda::getCurrentCUDAStream(short) + 0x380 (0x7fac192be5e0 in /home/wit/anaconda3/envs/cascade/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libc10_cuda.so)
frame #2: <unknown function> + 0xe0824 (0x7fac429bb824 in /home/wit/anaconda3/envs/cascade/lib/python2.7/site-packages/caffe2/python/caffe2_pybind11_state_gpu.so)
frame #3: <unknown function> + 0xe0b58 (0x7fac429bbb58 in /home/wit/anaconda3/envs/cascade/lib/python2.7/site-packages/caffe2/python/caffe2_pybind11_state_gpu.so)
frame #4: <unknown function> + 0xe3bcd (0x7fac429bebcd in /home/wit/anaconda3/envs/cascade/lib/python2.7/site-packages/caffe2/python/caffe2_pybind11_state_gpu.so)
frame #5: <unknown function> + 0xe5b88 (0x7fac429c0b88 in /home/wit/anaconda3/envs/cascade/lib/python2.7/site-packages/caffe2/python/caffe2_pybind11_state_gpu.so)
frame #6: <unknown function> + 0x4e7b7 (0x7fac429297b7 in /home/wit/anaconda3/envs/cascade/lib/python2.7/site-packages/caffe2/python/caffe2_pybind11_state_gpu.so)
frame #7: <unknown function> + 0x8b898 (0x7fac42966898 in /home/wit/anaconda3/envs/cascade/lib/python2.7/site-packages/caffe2/python/caffe2_pybind11_state_gpu.so)
<omitting python frames>

Aborted (core dumped)

conda install pytorch torchvision cudatoolkit=9.0 -c pytorch
目前通过测试的匹配版本是torch1.1.0

 

转载于:https://www.cnblogs.com/aimhabo/p/11471315.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值