Open waldstein94 opened 4 years ago
I pushed a small fix. Can you merge your multi-gpu code with it and see if it works?
The current code in the repository does not support multi-GPU training. The easiest way to use multi-gpu is using torch.nnDataparallel. But make sure you adjust code for gen_mesh and error evaluation.
After adding few codes to main file, code is well running now. However, I didn't adjust any code for gen_mesh. Do you think it will make a problem? Also, can I ask what how you modified the code to work?
Anyway, thank you soooooooooo much for your fast and caring feed back. It really helped me a lot!
I meant you have to pass netG.module instead of netG if you replace the network with torch.dataparallel. You don't have to change code inside gen_mesh itself. Glad that it worked out. Would it be possible to send pull request with multi-GPU support if you don't mind? (I just haven't had time to do it by myself, thanks!)
Of course, but it may take time because I'm very beginner of GitHub. If you are okay with it, I'll try :)
Hello shunsuke, I'm here again :)
I've tried to run the code with multiple GPUs but it did not seem to work.
At first, I rewrote and ran codes in def init_net (net_util.py) , but just one gpu worked except very few increasing memory allocation in other GPUs. How do I use this code with multi GPU?
Second, I added the torch.nn.Dataparallel with 'netG' in line 50(train_shape.py) but some error related to 'mismatching gpu between model and input' had been occured. Have you met kind of this error when you tried to use multiple GPUs?
Thank you in advance, I'll wait your response!