Mask R CNN踩坑

Mask RCNN复现过程过于痛苦,记录每一个深坑。

1.apex安装失败

Cuda版本10.0

Pytorch1.0.0

按照官方INSTALL.MD输入

python setup.py install --cuda_ext --cpp_ext 

 报错:

In file included from csrc/multi_tensor_sgd_kernel.cu:5:0:
csrc/multi_tensor_apply.cuh:5:10: fatal error: c10/cuda/CUDAGuard.h: No such file or rectory
 #include <c10/cuda/CUDAGuard.h>
          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1

 查询了n个网站,最后通过科学上网找到解决方法:

在终端输入

git checkout f3a960f80244cf9e80558ab30f7f7e8cbf03c0a0

返回:

Note: checking out 'f3a960f80244cf9e80558ab30f7f7e8cbf03c0a0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at f3a960f fix typo

再次输入原安装代码:

python setup.py install --cuda_ext --cpp_ext 

 成功后:

Processing dependencies for apex==0.1
Finished processing dependencies for apex==0.1

终于解决了一天的问题,但是原理不太清楚,欢迎大佬指点。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值