SinGAN icon indicating copy to clipboard operation
SinGAN copied to clipboard

MULTI-GPU

Open XiaoHao-Chen opened this issue 6 years ago • 2 comments

First of all, thank you for your excellent work and congratulations on your paper winning the best paper award in ICCV2019. I'm very interested in your work. But I have some problems running your code. I hope you can help me.

  1. Can the program run on multiple GPUs? I changed the default value of CUDA in config.py from 1 to 2, but it was useless.
  2. Can only one training image be sent to Gan for training, and then the next training image can be changed artificially? If I have 1000 images, can I put them in a folder and send them to the program to generate them automatically? Instead of a training, the program stops, and I manually fill in the name of the next picture that needs training.
  3. What's the difference between G (z'opt). png and fake_sample.png in the saved file? What's the use of z_opt.pth, gs.pth, noisemamp.pth, reals.pth, zs.pth files? What are their contents? Thank you very much for your help. Your work is really excellent!

XiaoHao-Chen avatar Oct 31 '19 02:10 XiaoHao-Chen

Thank you!

  1. The code does not support multiple GPUs currently.
  2. For this you will need to add a loop to the training function for each of your images.
  3. G(z_opt) is the reconstruction of the real image. Please see explanation in section 2 in our paper: http://openaccess.thecvf.com/content_ICCV_2019/papers/Shaham_SinGAN_Learning_a_Generative_Model_From_a_Single_Natural_Image_ICCV_2019_paper.pdf

tamarott avatar Nov 05 '19 16:11 tamarott

Thank you!

  1. The code does not support multiple GPUs currently.
  2. For this you will need to add a loop to the training function for each of your images.
  3. G(z_opt) is the reconstruction of the real image. Please see explanation in section 2 in our paper: http://openaccess.thecvf.com/content_ICCV_2019/papers/Shaham_SinGAN_Learning_a_Generative_Model_From_a_Single_Natural_Image_ICCV_2019_paper.pdf

Thank you for your reply. I'd like to ask you another question. As mentioned in the supplementary materials submitted by you, when generating 256 * 256 images, on a single 1080ti GPU, the training time will take about 30 minutes, and the actual generated images will be less than one second each. But when I run main.train.py, when I train to generate 224 * 224 images, the actual training time is nearly two hours. Why? My image size for training is 224 * 224. My device is 2080ti, cuda9.0, pytorch1.1.0, python3.6. I've also tested it on 1080ti, and it takes longer to train. Looking forward to your reply again.

XiaoHao-Chen avatar Nov 06 '19 00:11 XiaoHao-Chen