DMPR-PS icon indicating copy to clipboard operation
DMPR-PS copied to clipboard

model training

Open YiF-chen opened this issue 4 years ago • 1 comments

Hi , Teoge. I want to train it use n(n>1) GPUS? if , need to change the code.

YiF-chen avatar Oct 21 '20 02:10 YiF-chen

Multi-GPU training with pytorch is pretty simple. All you need to do is wrap the model with nn.DataParallel. Here are some links that might help you: https://pytorch.org/tutorials/beginner/blitz/data_parallel_tutorial.html https://pytorch.org/tutorials/beginner/former_torchies/parallelism_tutorial.html Although I haven't tried it yet, I believe it should work fine. Feel free to let me know if you encounter more problems.

Teoge avatar Nov 08 '20 05:11 Teoge