PWC-Net icon indicating copy to clipboard operation
PWC-Net copied to clipboard

Errors met when using the correlation package for PyTorch

Open shuaiyuan1996 opened this issue 5 years ago • 3 comments

Hi,

It seems that I have installed the external correlation package for PyTorch successfully (no error messages shown), but when I use the Correlation module under the package, I get the following error.

AttributeError: module 'correlation_package._ext.corr' has no attribute 'corr_cuda_forward'

Does anyone have the same problem? Any ideas on how to fix this?

My software environment: Python 3.6, PyTorch 0.4.0, CUDA 8.0.

Thanks! :)

shuaiyuan1996 avatar Feb 24 '20 17:02 shuaiyuan1996

I solved this problem by replacing the Correlation package here with the one provided by FlowNet2.

First, download correlation_package to PWC-Net/PyTorch/models/. That looks like:

PWC-Net/PyTorch/models/
    correlation_package
    PWCNet.py
    __init__.py

Then, build the package:

cd  PWC-Net/PyTorch/models/correlation_package
python3 setup.py install --user

Finally, change the import at PWCNet.py line 13

from:

from correlation_package.modules.corr import Correlation 

to:

from .correlation_package.correlation import Correlation

ShoufaChen avatar Mar 10 '20 09:03 ShoufaChen

I got Segmentation fault (core dumped) with the FlowNet2 Correlation package.
I'm using python 3.7, pytorch 1.4 and cuda 10.1.
Not sure how to solve this...

xiedidan avatar Apr 03 '20 09:04 xiedidan

I have encountered error when trying to compile the correlation package. Managed to resolve by compiling it from here (https://github.com/vt-vl-lab/pwc-net.pytorch) and move over the generated folders

teejs2012 avatar Jul 10 '20 10:07 teejs2012