haofeixu / aanet

[CVPR'20] AANet: Adaptive Aggregation Network for Efficient Stereo Matching
Apache License 2.0
524 stars 102 forks source link

ImportError: cannot import name 'deform_conv_cuda' #20

Closed prabhuiitdhn closed 4 years ago

prabhuiitdhn commented 4 years ago

I am working on anaconda (in Windows), I have followed the mentioned steps for installation, But I am getting this error.


from . import deform_conv_cuda
ImportError: cannot import name 'deform_conv_cuda'

Please help.

haofeixu commented 4 years ago

Have you successfully installed the deformable conv op? Could you please give more details about when this error occurs?

prabhuiitdhn commented 4 years ago

Yeah, I think so, I am working on anaconda in Windows, so I was not able to run the build.sh file but I ran the command '$PYTHON setup.py build_ext --inplace' in anaconda prompt.

#!/usr/bin/env bash

PYTHON=${PYTHON:-"python"}

if [ -d "build" ]; then
    rm -r build
fi
$PYTHON setup.py build_ext --inplace

Is there any way to do that in windows?

haofeixu commented 4 years ago

I think you are right, but you may want to refer to this issue to resolve the error since I have never tested my code on windows, sorry about that.

prabhuiitdhn commented 4 years ago

Hi @haofeixu, Thanks for replying. But is it restricted to have cuda10.0? Bcz Even after setting it up in linux pc I am getting the same error.

Currently, I have ubuntu with cuda 9.0 and pytorch 1.5.0, will this run?

haofeixu commented 4 years ago

I think cuda 9.0 should be okay, but I am not sure whether cuda 9.0 is supported by pytorch 1.5.0. You can check that by running torch.cuda.is_available(), if the output is False, you may need to downgrade pytorch to 1.1.0.

However, you are highly recommanded to use exactly same version (cuda 10.0 and pytorch 1.2.0) as ours to avoid version conflicts.