NVlabs / few-shot-vid2vid

Pytorch implementation for few-shot photorealistic video-to-video translation.
Other
1.8k stars 275 forks source link

flownet2_pytorch resample2d_cuda error #39

Open yisampi opened 4 years ago

yisampi commented 4 years ago

Has anyone encountered this error? ImportError: /root/miniconda/envs/py36/lib/python3.6/site-packages/resample2d_cuda-0.0.0-py3.6-linux-x86_64.egg/resample2d_cuda.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at19NonVariableTypeMode10is_enabledEv

my environment: Docker:nvidia/cuda:9.2-cudnn7-devel-ubuntu18.04-py3.6.10 torch:1.2.0

zhhezhhe commented 4 years ago

Same problem.

k4rth33k commented 4 years ago

You need to compile the flownet module. I believe it's mentioned in the readme.md

zhhezhhe commented 4 years ago

You need to compile the flownet module. I believe it's mentioned in the readme.md

Thank you for your quick reply! I have run bash install.sh to install flownet successfully. But I still got

ImportError: /ssd3/zhaoruiqi/anaconda3/envs/python3/lib/python3.7/site-packages/resample2d_cuda-0.0.0-py3.7-linux-x86_64.egg/resample2d_cuda.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationERKSs

I use python3.7, pytorch 1.2.0, torchvision 0.4.0, cuda 10.0, gcc4.9 do you think there is a problem with my setup?

k4rth33k commented 4 years ago

If you have installed flownet successfully, I don't think the problem is with the setup. I ran it on almost the same setup but with python 3.6 and pip

zhhezhhe commented 4 years ago

If you have installed flownet successfully, I don't think the problem is with the setup. I ran it on almost the same setup but with python 3.6 and pip

There are no errors when I run bash install.sh for flownet2-pytorch. But when I import resample2d_cuda an error came out

undefined symbol: _ZN2at19NonVariableTypeMode10is_enabledEv

Is it a pytorch-version problem? I used pytorch1.2.0 cuda-10.0/cuda-9.2.

zhhezhhe commented 4 years ago

The problem is solved. python3.6 is OK.

Hamed-Aghapanah commented 3 years ago

Go to the folder: vid2vid/models/flownet2_pytorch/networks/resample2d_package/

and run the commands: python3 setup.py build and python3 setup.py install

in that order, fixed it for me.

mamunctg commented 2 years ago

The problem is solved. python3.6 is OK.

I follow all of your configurations but I am getting errors about the apex package. Could you please help?

####################ERROR######## class GradScaler(torch.cuda.amp.GradScaler): AttributeError: module 'torch.cuda' has no attribute 'amp'

########################

songyn95 commented 2 years ago

@mamunctg I also encountered this problem. How did you solve it?

digvijayad commented 2 years ago

@songyn95 @mamunctg install the apex package.