成功解决AttributeError: module ‘torch.distributed‘ has no attribute ‘_all_gather_base‘

在安装apex后遇到AttributeError: module ‘torch.distributed’ has no attribute ‘_all_gather_base’的问题。分析认为是版本不匹配,通过卸载旧版本,更新pytorch至1.7.0并重新安装apex来解决此错误。
摘要由CSDN通过智能技术生成

成功解决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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

CV视界

如果感觉有用,可以打赏哦~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值