Serge-weihao / CCNet-Pure-Pytorch

Criss-Cross Attention (2d&3d) for Semantic Segmentation in pure Pytorch with a faster and more precise implementation.
MIT License
183 stars 21 forks source link

can this work with cuda toolkit 11.2 + for nvidia 3090 ? #9

Closed johndpope closed 3 years ago

johndpope commented 3 years ago

(torch) ➜ CCNet git:(master) ✗ ./run_local.sh
Linux pop-os 5.8.0-7630-generic #32~1609193707~20.10~781bb80-Ubuntu SMP Tue Jan 5 21:29:56 UTC 2 x86_64 x86_64 x86_64 GNU/Linux Fri 05 Feb 2021 21:04:13 AEDT Traceback (most recent call last): File "train.py", line 16, in from networks.ccnet import Res_Deeplab File "/home/jp/Documents/gitWorkspace/CCNet/networks/ccnet.py", line 15, in from libs import InPlaceABN, InPlaceABNSync File "/home/jp/Documents/gitWorkspace/CCNet/libs/init.py", line 1, in from .bn import ABN, InPlaceABN, InPlaceABNWrappe r, InPlaceABNSync, InPlaceABNSyncWrapper File "/home/jp/Documents/gitWorkspace/CCNet/libs/bn.py", line 15, in from .functions import inplace_abn, inplace_abn_sync File "/home/jp/Documents/gitWorkspace/CCNet/libs/functions.py", line 5, in from . import _ext File "/home/jp/Documents/gitWorkspace/CCNet/libs/_ext/init.py", line 2, in from torch.utils.ffi import _wrap_function File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/ffi/init.py", line 1, in raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.") ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead. Traceback (most recent call last): File "evaluate.py", line 14, in from networks.ccnet import Res_Deeplab File "/home/jp/Documents/gitWorkspace/CCNet/networks/ccnet.py", line 15, in from libs import InPlaceABN, InPlaceABNSync File "/home/jp/Documents/gitWorkspace/CCNet/libs/init.py", line 1, in from .bn import ABN, InPlaceABN, InPlaceABNWrapper, InPlaceABNSync, InPlaceABNSyncWrapper File "/home/jp/Documents/gitWorkspace/CCNet/libs/bn.py", line 15, in from .functions import inplace_abn, inplace_abn_sync File "/home/jp/Documents/gitWorkspace/CCNet/libs/functions.py", line 5, in from . import _ext File "/home/jp/Documents/gitWorkspace/CCNet/libs/_ext/init.py", line 2, in from torch.utils.ffi import _wrap_function File "/home/jp/miniconda3/envs/torch/lib/python3.8/site-packages/torch/utils/ffi/init.py", line 1, in raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.") ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.

Serge-weihao commented 3 years ago

you can remove from inplace_abn import InPlaceABN, InPlaceABNSync, because it is not used below

johndpope commented 3 years ago

seems intertwined - from inplace_abn import InPlaceABN, InPlaceABNSync BatchNorm2d = functools.partial(InPlaceABNSync, activation='identity')

Serge-weihao commented 3 years ago

@johndpope https://github.com/Serge-weihao/CCNet-Pure-Pytorch/blob/bb502bb32f1d8eadbd7fb06152be570c23e9fbd1/networks/ccnet.py#L19

johndpope commented 3 years ago

There's some progress on branches from the original repo - going to try those

https://github.com/speedinghzl/CCNet/tree/pytorch-1.5 https://github.com/speedinghzl/CCNet/tree/pure-python

UPDATE - looks like it's working - just need to set CS_PATH