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

Gpu selection + Tensorboard + Faster MNIST

Open pierrebernard7 opened this issue 4 years ago • 0 comments

Hello there,

First of all thanks for your amazing work on gans. you made them really easy to understand for newbies.

I added a few things to gan.py and cgan.py (which are the only ones I've used so far) :

  • allow to select which gpu to use with a command line argument "--gpu" 0, 1 or 2 etc.
  • tensorboard visualisation of G and D losses
  • improved version of the MNIST dataset class which I found here : https://gist.github.com/y0ast/f69966e308e549f013a92dc66debeeb 4. It bypasses the image resizing which converts the image to PIL object and is slow.. It's only enabled when setting im_size 28 then (original MNIST size). I've seen great improvements (x2 speed)

If you want I can also make those changes to the other gans

Cheers.

pierrebernard7 avatar May 04 '20 14:05 pierrebernard7