AttnGAN icon indicating copy to clipboard operation
AttnGAN copied to clipboard

How to run the network in parallel on multiple cards

Open activate-an opened this issue 4 years ago • 2 comments

When I try to increase the size of the output image, it will prompt that there is not enough memory, so how can I run the network on multiple cards in parallel to achieve a larger output?

activate-an avatar Dec 04 '20 01:12 activate-an

I have run the code in multiple GPUS successfully! You need to wrap models by DataParallel firstly. There are still some changes to be made in the code, beacuse when you use multiple cards, a batch will be separated and distributed on each GPU, after each part of a batch through models, they will be merged to a batch again, which will cause a lot of bugs in code. For example in RNN model, when different part of a batch through the model, the max value in argument cap_lens will be different.

fyw1999 avatar Jul 09 '21 02:07 fyw1999

@fyw1999 , could you please enlighten us with the changes specifically ?

AudityGhosh avatar Oct 06 '23 19:10 AudityGhosh