minar09 / ACGPN

"Towards Photo-Realistic Virtual Try-On by Adaptively Generating↔Preserving Image Content",CVPR 2020. (Modified from original with fixes for inference)
https://github.com/switchablenorms/DeepFashion_Try_On
77 stars 70 forks source link

Using Multiple GPUs #7

Closed hfarhidzadeh closed 3 years ago

hfarhidzadeh commented 3 years ago

Hi,

Can you let me know how to use mutilGPU on this code? I checked netwoeks.py, all networks are assigned to model.cuda(gpus_id[0]). Bymodel.cuda(gpus_id), does the network works on gpus or I need to do

model = nn.DataParallel(model) as well?

minar09 commented 3 years ago

Hi @hfarhidzadeh , I think you can just specify the number of GPUs in the base_options.py arguments, and it should work fine. See here: https://github.com/minar09/ACGPN/blob/c4df9738e13412f9fb2be57deefcce99373fa5f1/options/base_options.py#L16