JimmyChame / SADNet

Pytorch code for "Spatial-Adaptive Network for Single Image Denoising"
128 stars 12 forks source link

Issue when I run test.py #4

Closed luckydog1996 closed 4 years ago

luckydog1996 commented 4 years ago

Traceback (most recent call last): File "/home/ztzhao/Documents/code/papers/SADNet/model/sadnet.py", line 7, in from dcn.deform_conv import ModulatedDeformConvPack2 as DCN File "/home/ztzhao/Documents/code/papers/SADNet/dcn/init.py", line 1, in from .deform_conv import (DeformConv, DeformConvPack, ModulatedDeformConv, ModulatedDeformConvPack, File "/home/ztzhao/Documents/code/papers/SADNet/dcn/deform_conv.py", line 10, in from . import deform_conv_cuda ImportError: cannot import name 'deform_conv_cuda' from 'dcn' (/home/ztzhao/Documents/code/papers/SADNet/dcn/init.py)

JimmyChame commented 4 years ago

You may recompile the dcn module according to your machine and then replace deform_conv.py with our file.

luckydog1996 commented 4 years ago

Sorry, I am not familiar with .cpp or .cuda. May you kindly show more detailed instructions on how to "compile"?

JimmyChame commented 4 years ago

You can compile the code according to your machine.

cd ./dcn
python setup.py develop