lhoyer / DAFormer

[CVPR22] Official Implementation of DAFormer: Improving Network Architectures and Training Strategies for Domain-Adaptive Semantic Segmentation
Other
470 stars 93 forks source link

why not support Multi-GPU? is it not necessary for UDA? #43

Closed fuweifu-vtoo closed 1 year ago

fuweifu-vtoo commented 2 years ago

Have you read code for SoftTeacher? This code seems to have nothing to do with ddp_train_gans, but it still use multi-gpu training UDA model. https://github.com/lhoyer/DAFormer/issues/9

fuweifu-vtoo commented 2 years ago

It feels like your code supports multi-gpu training natively because you use the DDP wrapper. You just need to start the command with OMP_NUM_THREADS=1 python3 -m torch.distributed.launch ?

xiaoachen98 commented 2 years ago

Have you read code for SoftTeacher? This code seems to have nothing to do with ddp_train_gans, but it still use multi-gpu training UDA model. https://github.com/lhoyer/DAFormer/issues/9

We have supported the Multi-GPU training procedure. You can follow our work and repo (https://github.com/xiaoachen98/DDB).

lhoyer commented 2 years ago

@fuweifu-vtoo DAFormer can be trained on a single GPU within 16 hours. As this is a very reasonable training time, we opted for simplicity and did not use Multi-GPU training. The instructions on how to generally use Multi-GPU training can be found in the mmsegmentation repository. Please, also check that the model update of the momentum teacher is compatible.

@xiaoachen98 Thanks for sharing your code with Multi-GPU training.