The module torch.distributed.launch is deprecatedand will be removed in future. Use torchrun.

解决方法1

        将 python -m torch.distributed.launch 更改为 torchrun

解决方法2

        将 python -m torch.distributed.launch 更改为 python -m torch.distributed.run

举个例子

原代码

python -m torch.distributed.launch train.py

更改为

torchrun train.py

你可能感兴趣的:(python,深度学习,机器学习)