linksense / LightNet

LightNet: Light-weight Networks for Semantic Image Segmentation (Cityscapes and Mapillary Vistas Dataset)
https://ansleliu.github.io/LightNet.html
MIT License
719 stars 175 forks source link

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

Open victorjdcom opened 6 years ago

victorjdcom commented 6 years ago

using pytorch1.0 as required by pytorch.encoding

SanjunLiu commented 6 years ago

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

RicheyHuang commented 5 years ago

@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!

Veeupup commented 5 years ago

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

BerryLJ commented 5 years ago

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