NVIDIA / vid2vid

Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic video-to-video translation.
Other
8.62k stars 1.2k forks source link

Questions about using multi gpus #123

Open AIprogrammer opened 5 years ago

AIprogrammer commented 5 years ago

Hi, I am confused with the code below:

n_gpus = opt.n_gpus_gen if opt.batchSize == 1 else 1 # number of gpus used for generator for each batch

  1. I don't know why n_gpus should be 1 when batchsize > 1.
  2. the meaning of putting the generator and discriminator on different gpus while training, instead of directly distribute the gens and dis on the multi gpus. self.split_gpus = (self.opt.n_gpus_gen < len(self.opt.gpu_ids)) and (self.opt.batchSize == 1)

Need your help! Thanks in advance.