PyTorch-CycleGAN icon indicating copy to clipboard operation
PyTorch-CycleGAN copied to clipboard

How to use multiple GPUs to train cycleGAN ?

Open MrLinNing opened this issue 5 years ago • 2 comments

MrLinNing avatar Sep 13 '18 11:09 MrLinNing

I have the same problem. Have you solved it?

lg920810 avatar Jan 17 '19 05:01 lg920810

if torch.cuda.device_count() > 1: print("Let's use", torch.cuda.device_count(), "GPUs!") netG_A2B = torch.nn.DataParallel(netG_A2B) netG_B2A = torch.nn.DataParallel(netG_B2A) netD_A = torch.nn.DataParallel(netD_A) netD_B = torch.nn.DataParallel(netD_B) if opt.cuda: netG_A2B.cuda() netG_B2A.cuda() netD_A.cuda() netD_B.cuda()

zhangluustb avatar Jul 25 '19 09:07 zhangluustb