speedinghzl / pytorch-segmentation-toolbox

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

about the implementation of DataParallelModel and DataParallelCriterion in ./utils/encoding.py #19

Closed yongjingli closed 5 years ago

yongjingli commented 5 years ago

Hi, speedinghzl. It seems that the implementation of DataParallelModel and DataParallelCriterion in ./utils/encoding.py are not integral.

speedinghzl commented 5 years ago

@yongjingli Yes, they are not integral. You can replace them with default DataParallel in Pytorch. In fact, I use them for balancing the memory usage on every GPUs.

ps. The code in ./utils/encoding.py is borrowed from Pytroch-Encoding.