Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depriciated torch.utils.ffi used #64

Open
research-boy opened this issue Sep 21, 2020 · 8 comments
Open

depriciated torch.utils.ffi used #64

research-boy opened this issue Sep 21, 2020 · 8 comments

Comments

@research-boy
Copy link

Traceback (most recent call last):
File "build.py", line 3, in
from torch.utils.ffi import create_extension
File "/usr/local/lib/python3.6/dist-packages/torch/utils/ffi/init.py", line 1, in
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Traceback (most recent call last):
File "build_modulated.py", line 3, in
from torch.utils.ffi import create_extension
File "/usr/local/lib/python3.6/dist-packages/torch/utils/ffi/init.py", line 1, in
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.

@JamesZhan107
Copy link

Have you solved this problem? @research-boy

@research-boy
Copy link
Author

@JamesZhan107 Not yet, let me know if you can help me with this

@JamesZhan107
Copy link

@JamesZhan107 Not yet, let me know if you can help me with this

https://github.com/ruinmessi/ASFF/tree/09f558863ae297663ec476f52a90c0cf6881415e/utils/DCN
This repo used dcnv2 and has modified the module. It can be complied.

@chengdazhi
Copy link
Owner

If you guys are using more up to date pytorch, you can checkout the deformable conv module in mmdetection repo.

@JamesZhan107
Copy link

‘’‘
inputs = Variable(torch.randn(N, inC, inH, inW).cuda(), requires_grad=True)
offset = conv(inputs)
#offset = Variable(torch.randn(N, num_deformable_groups * 2 * kH * kW, inH, inW).cuda(), requires_grad=True)
output = conv_offset2d(inputs, offset)
‘’’
As is shown in test.py, are these two inputs the same? @chengdazhi

@chengdazhi
Copy link
Owner

Yep

@JamesZhan107
Copy link

Yep

OK, Thanks you !

@herbertcai
Copy link

Hi @chengdazhi,

I tried the DCN from here: https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch/tree/mmdetection/mmdet/ops/dcn. It still gives the depreciation error. I then went to the official mmdetection repo https://github.com/open-mmlab/mmdetection, but couldn't find the DCN module. Could you point me to the right location?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants