chengdazhi / Deformable-Convolution-V2-PyTorch

Deformable ConvNets V2 (DCNv2) in PyTorch
MIT License
1.44k stars 229 forks source link

ImportError: : undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationERKSs #44

Open qianzhang2018 opened 4 years ago

qianzhang2018 commented 4 years ago

Traceback (most recent call last): File "train.py", line 236, in main() File "train.py", line 138, in main model = create_model(opt) # model loss optimize File "/mnt/ftp/code/zq/realsr/de_BasicSR-master/codes/models/init.py", line 9, in create_model from .SR_model import SRModel as M File "/mnt/ftp/code/zq/realsr/de_BasicSR-master/codes/models/SR_model.py", line 7, in import models.networks as networks File "/mnt/ftp/code/zq/realsr/de_BasicSR-master/codes/models/networks.py", line 3, in import models.modules.SRResNet_arch as SRResNet_arch File "/mnt/ftp/code/zq/realsr/de_BasicSR-master/codes/models/modules/SRResNet_arch.py", line 4, in import models.modules.module_util as mutil File "/mnt/ftp/code/zq/realsr/de_BasicSR-master/codes/models/modules/module_util.py", line 7, in from deformable.modules.modulated_deform_conv import ModulatedDeformConv, _ModulatedDeformConv, ModulatedDeformConvPack File "/mnt/ftp/code/zq/realsr/de_BasicSR-master/codes/models/modules/deformable/modules/init.py", line 1, in from .deform_conv import DeformConv, _DeformConv, DeformConvPack File "/mnt/ftp/code/zq/realsr/de_BasicSR-master/codes/models/modules/deformable/modules/deform_conv.py", line 12, in from functions.deform_conv_func import DeformConvFunction File "/home/zq/anaconda3/envs/realsr/lib/python3.6/site-packages/DCN-1.0-py3.6-linux-x86_64.egg/functions/init.py", line 1, in from .deform_conv_func import DeformConvFunction File "/home/zq/anaconda3/envs/realsr/lib/python3.6/site-packages/DCN-1.0-py3.6-linux-x86_64.egg/functions/deform_conv_func.py", line 13, in import DCN ImportError: /home/zq/anaconda3/envs/realsr/lib/python3.6/site-packages/DCN-1.0-py3.6-linux-x86_64.egg/DCN.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationERKSs

KelvinHuang666 commented 4 years ago

I met the simple question...

Traceback (most recent call last): File "demo.py", line 136, in demo() File "demo.py", line 82, in demo from models.yolov3_baseline import YOLOv3 File "/asff/models/yolov3_baseline.py", line 5, in from .network_blocks import * File "/asff/models/network_blocks.py", line 5, in from utils.DCN.modules.deform_conv2d import DeformConv2d File "/asff/utils/DCN/modules/init.py", line 1, in from .deform_conv2d import DeformConv2d, _DeformConv2d, DeformConv2dPack, DeformConv2dPackMore File "/asff/utils/DCN/modules/deform_conv2d.py", line 12, in from ..functions.deform_conv2d_func import DeformConv2dFunction File "/asff/utils/DCN/functions/init.py", line 1, in from .deform_conv2d_func import DeformConv2dFunction File "/asff/utils/DCN/functions/deform_conv2d_func.py", line 13, in import DCN ImportError: /usr/local/lib/python3.6/dist-packages/DCN-1.0-py3.6-linux-x86_64.egg/DCN.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe26detail37_typeMetaDataInstance_preallocated_32E root@0ad4f68fc474:/asff#

WangZhaoxue000 commented 4 years ago

the same problem...

KelvinHuang666 commented 4 years ago

change your torch version

WangZhaoxue000 commented 4 years ago

torch.version ='1.3.1', torchvision.version='0.4.2' still got the error

myselvess commented 4 years ago

torch.version ='1.3.1', torchvision.version='0.4.2' still got the error

same version, have you solve this problem?

XYZ-qiyh commented 4 years ago

change your torch version

Hello, which version of PyTorch do you use? I met the same problem。 I' using Pytorch 1.0.1 and CUDA 10.0

WeixiongLin commented 3 years ago

Same here, I use torch 1.0.1. I tried CUDA 10.0 and 9.2, they don't work.

ted-chl commented 2 years ago

I also met error with using torch 1.0.0, CUDA 10.2 (also in torch 1.10.0)

yukistavailable commented 2 years ago

I succeeded in installing DCN and importing it by the solution below. But I don't know if it works fine for other people.

  1. clone this repository
  2. install anaconda and create a conda environment: conda create -n my-env python=3.7
  3. install some packages: conda install pytorch=1.3.1 torchvision cudatoolkit=10.0 pillow=6.1
  4. sh make.sh