语义分割环境搭建(pytorch)

语义分割代码实现时,出现好多错误,有代码级需要单独配置的,也有环境方面的。

1.如下面,代码之类。直接调代码即ok

【Traceback (most recent call last):

  File "evaluate.py", line 6, in <module>

    from networks.CE2P import Res_Deeplab

  File "/networks/CE2P.py", line 13, in <module>

    from libs import InPlaceABN, InPlaceABNSync

  File "libs/__init__.py", line 9, in <module>

    from networks import Res_Deeplab

ImportError: cannot import name 'Res_Deeplab'

2.下面之类错误, 因为cuda版本与 pytorch可能不一致 。之前 cuda10,装cuda9,就ok了

Traceback (most recent call last):

  File "train.py", line 13, in <module>

    from networks.CE2P import Res_Deeplab

  File "networks/CE2P.py", line 13, in <module>

    from libs import InPlaceABN, InPlaceABNSync

  File "/libs/__init__.py", line 1, in <module>

    from .bn import ABN, InPlaceABN, InPlaceABNWrapper, InPlaceABNSync, InPlaceABNSyncWrapper

  File "/libs/bn.py", line 15, in <module>

    from .functions import inplace_abn, inplace_abn_sync

  File "libs/functions.py", line 5, in <module>

    from . import _ext

  File "libs/_ext/__init__.py", line 3, in <module>

    from .__ext import lib as _lib, ffi as _ffi

ImportError: /libs/_ext/__ext.so: undefined symbol: __cudaPopCallConfiguration



https://github.com/liutinglt/CE2P

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。