其他分享
首页 > 其他分享> > RuntimeError: Default process group has not been initialized, please make sure to call init_process_

RuntimeError: Default process group has not been initialized, please make sure to call init_process_

作者:互联网

在使用mmSegmentation框架时遇到的问题:

 File "C:\software\Anaconda3\envs\python36\lib\site-packages\torch\distributed\distributed_c10d.py", line 347, in _get_default_group
    raise RuntimeError("Default process group has not been initialized, "
RuntimeError: Default process group has not been initialized, please make sure to call init_process_group.

经调试定位,发现是一个卷积模块的normalization出现了问题:

        self.linear_fuse = ConvModule(
            in_channels=embedding_dim*4,
            out_channels=embedding_dim,
            kernel_size=1,
            norm_cfg=dict(type='SyncBN', requires_grad=True)
          
        )

这里的norm_cfg中,如果是多卡训练,采用“SyncBN”; 如果是单卡训练,将type修改为'BN'即可。

标签:sure,group,process,RuntimeError,been,Default,initialized
来源: https://blog.csdn.net/qq_33854260/article/details/120409511