python -m torch.distributed.launch --nproc_per_node 4 train_ddp.py
其中4为启动进程数（小于等于可用GPU数）