语义分割环境搭建(pytorch)

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

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

【Traceback (most recent call last):

  File "evaluate.py", line 6, in

    from networks.CE2P import Res_Deeplab

  File "/networks/CE2P.py", line 13, in

    from libs import InPlaceABN, InPlaceABNSync

  File "libs/__init__.py", line 9, in

    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

    from networks.CE2P import Res_Deeplab

  File "networks/CE2P.py", line 13, in

    from libs import InPlaceABN, InPlaceABNSync

  File "/libs/__init__.py", line 1, in

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

  File "/libs/bn.py", line 15, in

    from .functions import inplace_abn, inplace_abn_sync

  File "libs/functions.py", line 5, in

    from . import _ext

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

    from .__ext import lib as _lib, ffi as _ffi

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



https://github.com/liutinglt/CE2P

你可能感兴趣的:(语义分割环境搭建(pytorch))