报错:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
File "/home/ubuntu/bigdisk/part2/Swin-Transformer-Object-Detection/mmdet/models/roi_heads/bbox_heads/convfc_bbox_head.py", line 139, in forward x = conv(x) File "/home/ubuntu/anaconda3/envs/swin/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in __call__ result = self.forward(*input, **kwargs) File "/home/ubuntu/anaconda3/envs/swin/lib/python3.7/site-packages/mmcv/cnn/bricks/conv_module.py", line 203, in forward x = self.norm(x) File "/home/ubuntu/anaconda3/envs/swin/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in __call__ result = self.forward(*input, **kwargs) File "/home/ubuntu/anaconda3/envs/swin/lib/python3.7/site-packages/torch/nn/modules/batchnorm.py", line 458, in forward world_size = torch.distributed.get_world_size(process_group) File "/home/ubuntu/anaconda3/envs/swin/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 586, in get_world_size return _get_group_size(group) File "/home/ubuntu/anaconda3/envs/swin/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 202, in _get_group_size _check_default_pg() File "/home/ubuntu/anaconda3/envs/swin/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 193, in _check_default_pg "Default process group is not initialized" AssertionError: Default process group is not initialized |
解决方法:
把配置文件中的SyncBN
全部改为BN
即可。
本文最后更新于2021年10月19日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!