maskrcnn-benchmark错误:ImportError: cannot import name rnn_compat

Posted haiyang21

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了maskrcnn-benchmark错误:ImportError: cannot import name rnn_compat相关的知识,希望对你有一定的参考价值。

错误:

from apex import amp
  File "build/bdist.linux-x86_64/egg/apex/__init__.py", line 5, in <module>
  File "build/bdist.linux-x86_64/egg/apex/amp/__init__.py", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/apex/amp/amp.py", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/apex/amp/rnn_compat.py", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/apex/amp/wrap.py", line 4, in <module>
ImportError: cannot import name rnn_compat

 

原因:使用了apex,可能原因是gcc编译版本不对,二是未使用python3执行命令

解决:1. 删掉apex目录下的build文件夹,重新编译

           2. 使用 python3 执行命令,因为使用anaconda2的时候python执行的是python2

以上是关于maskrcnn-benchmark错误:ImportError: cannot import name rnn_compat的主要内容,如果未能解决你的问题,请参考以下文章

docker

docker

docker

SpringBoot统一错误处理

错误:需要以下参数:-i/--image

故事书插件自述错误显示顺序