speedinghzl / pytorch-segmentation-toolbox

PyTorch Implementations for DeeplabV3 and PSPNet
MIT License
768 stars 167 forks source link

raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.") ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead. #52

Open karlcao opened 4 years ago

karlcao commented 4 years ago

I follow the guidance, but pytorch1.0 do not support torch.utils.ffi. I can not run the code

karlcao commented 4 years ago

can not from torch.utils.ffi import _warp

swjtulinxi commented 4 years ago

你好,请问单张gpu是不是可以直接用nn.BatchNorm2d,然后DataParallelModel(deeplab),,DataParallelCriterion(criterion)这两句都可以不要对吧

swjtulinxi commented 4 years ago

还有你这个代码当中的模型中输出两个值下,x和dsn,dsn用于辅助损失函数,像pspnet那样,但计算loss时并没有把dsn考虑进去

eternaldolphin commented 3 years ago

can not from torch.utils.ffi import _warp

how do you solve the problem?I have the same problem with you.

skyler9901 commented 2 years ago

1.find the following sentence: from torch.utils.ffi import create_extension change it to : from torch.utils.cpp_extension import BuildExtension

  1. find the following sentence: ffi = create_extension(…) change it to: ffi = BuildExtension(…)
fachengxionglxq commented 2 years ago

这个好像并不能解决问题