LightNet icon indicating copy to clipboard operation
LightNet copied to clipboard

ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.

Open victorjdcom opened this issue 6 years ago • 4 comments

using pytorch1.0 as required by pytorch.encoding

victorjdcom avatar Oct 26 '18 22:10 victorjdcom

I have the same problem, some body can help me? ww

SanjunLiu avatar Nov 13 '18 09:11 SanjunLiu

@victorjdcom @SanjunLiu Using the version before pytorch 1.0 should solve the problem. In my test, I use pytorch 0.3.0 along with this branch of pytorch-encoding: https://github.com/RicheyHuang/PyTorch-Encoding It took me so much time to find out the suitable version for those dependencies since they all had been updating and some versions of codes can only be found on the forks now... Good luck!

RicheyHuang avatar Dec 17 '18 07:12 RicheyHuang

Try to change the version of pytorch.It may help you. Good luck!

Veeupup avatar Feb 26 '19 05:02 Veeupup

you can try from torch.utils.ffi import create_extension change from torch.utils.cpp_extension import BuildExtension,your code will be work!

BerryLJ avatar Apr 03 '19 12:04 BerryLJ