f90 / FactorGAN

FactorGAN - Training GANs with missing data
MIT License
35 stars 3 forks source link

How to use multiple GPUs? #6

Open bilalsattar opened 4 years ago

bilalsattar commented 4 years ago

I have two GPUs in my machine. Is there a way to use multiple gpus for training? I can see training is not fully utilizing the GPU memory as well

f90 commented 4 years ago

Hey, parallel GPU usage should be a simple addition by wrapping the generator and discriminator(s) in a DataParallel module, for example in Image2Image.py. Do you want to make this addition yourself and then submit a pull request so I can add it to the codebase?

For GPU utilisation, it's true that some training loops are a bit GPU-starved because of slow data loading. This only applies to some tasks I think though - which one are you trying? We could investigate together how to speed things up in this regard.