NVIDIA / vid2vid

Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic video-to-video translation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Questions about using multi gpus

AIprogrammer opened this issue · comments

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.