成功解决AttributeError: module ‘torch.distributed’ has no attribute ‘_all_gather_base’
作者:安静到无声 个人主页
在安装apex后,虽然执行成功,但报出来了如下错误:
AttributeError: module 'torch.distributed' has no attribute '_all_gather_base'
经过分析,认为是由于apex包安装的版本不匹配导致的。
于是我选择卸载的原有的安装包和对用的文件:
(BUTD) lihuanyu@ubuntu-NF5468M5:~/code/bottom-up-attention.pytorch/apex$ pip uninstall apex
Found existing installation: apex 0.1
Uninstalling apex-0.1:
Would remove:
/home/lihuany