xinntao / EDVR

Winning Solution in NTIRE19 Challenges on Video Restoration and Enhancement (CVPR19 Workshops) - Video Restoration with Enhanced Deformable Convolutional Networks. EDVR has been merged into BasicSR and this repo is a mirror of BasicSR.
https://github.com/xinntao/BasicSR
1.48k stars 320 forks source link

Problem with importing ModulatedDeformConvPack #116

Open NasrinR791 opened 4 years ago

NasrinR791 commented 4 years ago

Hi Everyone, I am trying to train the EDVR in google colab with torch.version '1.3.0+cu100' I have compliled the DCN module first: (!python setup.py develop) and this is the result:

running develop running egg_info writing deform_conv.egg-info/PKG-INFO writing dependency_links to deform_conv.egg-info/dependency_links.txt writing top-level names to deform_conv.egg-info/top_level.txt reading manifest file 'deform_conv.egg-info/SOURCES.txt' writing manifest file 'deform_conv.egg-info/SOURCES.txt' running build_ext copying build/lib.linux-x86_64-3.6/deform_conv_cuda.cpython-36m-x86_64-linux-gnu.so -> Creating /usr/local/lib/python3.6/dist-packages/deform-conv.egg-link (link to .) Adding deform-conv 0.0.0 to easy-install.pth file Installed /content/gdrive/My Drive/Colab Notebooks/EDVR/EDVR-master/codes/models/archs/dcn Processing dependencies for deform-conv==0.0.0 Finished processing dependencies for deform-conv==0.0.0

However, when I try to import ModulatedDeformConvPack as DCN, I face ImportError in this line: from models.archs.dcn import deform_conv_cuda

ImportError: /content/gdrive/My Drive/Colab Notebooks/EDVR/EDVR-master/codes/models/archs/dcn/deform_conv_cuda.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN3c1011CPUTensorIdEv

Could anybody help me to solve this problem?

Jimzhou82sub commented 4 years ago

I have the same question

luissen commented 4 years ago

How to solve it?

sduzk commented 4 years ago

i am so sad to meet the same question with you

DefaultaideN commented 4 years ago

I meet the same problem. My suggestion is to look for answers in https://github.com/open-mmlab/mmdetection/issues/1577. Still trying,

NasrinR791 commented 4 years ago

In my case, I removed all previous build files from /archs/dcn folder including builds, deform_conv.egg-info , pycache, and .so file, then I rebuilt them by running python setup.py develop, this solved the problem.

DefaultaideN commented 4 years ago

In my case, I removed all previous build files from /archs/dcn folder including builds, deform_conv.egg-info , pycache, and .so file, then I rebuilt them by running python setup.py develop, this solved the problem.

Absolutely right.