➜ vid2vid git:(master) python scripts/download_flownet2.py
Compiling correlation kernels by nvcc...
rm: cannot remove '../_ext': No such file or directory
Traceback (most recent call last):
File "build.py", line 3, in <module>
import torch.utils.ffi
File "~/.local/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 1, in <module>
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Compiling resample2d kernels by nvcc...
rm: cannot remove 'Resample2d_kernel.o': No such file or directory
rm: cannot remove '../_ext': No such file or directory
In file included from Resample2d_kernel.cu:1:0:
~/.local/lib/python3.6/site-packages/torch/lib/include/THC/THC.h:4:10: fatal error: THC/THCGeneral.h: No such file or directory
#include <THC/THCGeneral.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
Traceback (most recent call last):
File "build.py", line 3, in <module>
import torch.utils.ffi
File "~/.local/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 1, in <module>
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Compiling channelnorm kernels by nvcc...
rm: cannot remove 'ChannelNorm_kernel.o': No such file or directory
rm: cannot remove '../_ext': No such file or directory
In file included from ChannelNorm_kernel.cu:1:0:
~/.local/lib/python3.6/site-packages/torch/lib/include/THC/THC.h:4:10: fatal error: THC/THCGeneral.h: No such file or directory
#include <THC/THCGeneral.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
Traceback (most recent call last):
File "build.py", line 3, in <module>
import torch.utils.ffi
File "~/.local/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 1, in <module>
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
However, file THC/THCGeneral.h exists indeed.
➜ vid2vid git:(master) ls ~/.local/lib/python3.6/site-packages/torch/lib/include/THC/THC.h
~/.local/lib/python3.6/site-packages/torch/lib/include/THC/THC.h
➜ vid2vid git:(master) ls ~/.local/lib/python3.6/site-packages/torch/lib/include/THC/THCGeneral.h
~/.local/lib/python3.6/site-packages/torch/lib/include/THC/THCGeneral.h
flownet2_pytorch_040.zip ? Or flownet2_pytorch git?
File ./scripts/download_flownet2.py seems to require torch 0.4.1 and flownet2_pytorch_040.zip ?
I'm using up-to-date PyTorch, and I've successfully built and installed the up-to-date official flownet2-pytorch. I mean: it seems I do NOT need to run the 4th script at all.
import os
from download_gdrive import *
import torch
if torch.__version__ == '0.4.1':
file_id = '1gKwE1Ad41TwtAzwDcN3dYa_S6DcVyiSl'
file_name = 'flownet2_pytorch_041.zip'
else:
file_id = '1F2h_6e8gyTqxnbmFFW72zsxx_JX0dKFo'
file_name = 'flownet2_pytorch_040.zip'
chpt_path = './models/'
if not os.path.isdir(chpt_path):
os.makedirs(chpt_path)
destination = os.path.join(chpt_path, file_name)
download_file_from_google_drive(file_id, destination)
unzip_file(destination, chpt_path)
os.system('cd %s/flownet2_pytorch/; bash install.sh; cd ../' % chpt_path)
What I've done afterwards is to use the up-to-date official flownet2-pytorch, instead of using the unzipped flownet2_pytorch_040.zip.
➜ ~ python
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> import resample2d_cuda
>>> resample2d_cuda.
resample2d_cuda.backward( resample2d_cuda.forward(
>>> from resample2d_cuda import Resample2d
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'Resample2d'
Hi, all:
I can successfully run the following 3 scripts,
but FAILED to run the 4th script:
File ./scripts/download_flownet2.py seems to require torch 0.4.1 and flownet2_pytorch_040.zip ?
I'm using up-to-date PyTorch, and I've successfully built and installed the up-to-date official flownet2-pytorch. I mean: it seems I do NOT need to run the 4th script at all.
Then, vid2vid testing still went wrong:
Clearly, there are 2 functions ONLY,
Can anybody please give me a hand?
Cheers Pei