meetps / pytorch-semseg

Semantic Segmentation Architectures Implemented in PyTorch
https://meetshah.dev/semantic-segmentation/deep-learning/pytorch/visdom/2017/06/01/semantic-segmentation-over-the-years.html
MIT License
3.38k stars 799 forks source link

Upgrade to PyTorch 1.0 #117

Open meetps opened 6 years ago

meetps commented 6 years ago

Planned updates

kcyu2014 commented 5 years ago

Hi, I have recently tested the current build on pytorch 0.4.1, and it encounter CUDA out of memory error. There is no problem in 0.4.0 for the current time being. Hope you could also look into this direction during the upgrade :)

kc

Spritea commented 5 years ago

Hi, guys:

I found a simple way to use this code with Pytorch 1.0 or 0.4.1. This error is caused by functools package used in fcn.py. So just comment related code below and it works.

#self.loss = functools.partial(cross_entropy2d, size_average=False)

Besides, for other models without functools, like segnet, it works correctly in Pytorch 1.0/0.4.1, without any modification.

See related #173