ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 15504) of binary:
时间: 2023-10-11 20:11:50 浏览: 327
据引用中的描述,你遇到的错误是"ERROR: torch.distributed.elastic.multiprocessing.api:failed"。根据你提供的详细错误内容"ValueError: sampler option is mutually exclusive with shuffle",这个错误是由于在使用分布式训练,并且在dataloader中将shuffle参数设置为True时,同时又使用了sampler。由于sampler已经在分配数据给GPU时自动打乱了数据,所以dataloader不需要再次打乱数据。这两者是相冲突的。因此,在使用分布式训练时,应该将dataloader中的shuffle参数设置为默认的False即可。<span class="em">1</span><span class="em">2</span>
#### 引用[.reference_title]
- *1* [【解决】pytorch单机多卡问题:ERROR: torch.distributed.elastic.multiprocessing.api:failed](https://blog.csdn.net/Caesar6666/article/details/126893353)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [pytorch:torch.mm()和torch.matmul()的使用](https://download.csdn.net/download/weixin_38674223/12856818)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文