当前位置:网站首页>[fairseq] error: typeerror:_ broadcast_ coalesced(): incompatible function arguments
[fairseq] error: typeerror:_ broadcast_ coalesced(): incompatible function arguments
2022-07-03 04:14:00 【Muasci】
Preface
I copied the model state_dict Method , Specifically, it adds dynamic_mask( Dictionary type , Inside is tensor),allocated_neuron_num( integer ).
def state_dict(self, destination=None, prefix='', keep_vars=False):
state_dict = super().state_dict(destination, prefix, keep_vars)
state_dict['model.dynamic_mask'] = gloVar.dynamic_mask
state_dict['model.allocated_neuron_num'] = gloVar.allocated_neuron_num
return state_dict
The result is wrong :
File "/data3/syxu/sparsenmt_exp/sparsenmt/fairseq/fairseq/models/distributed_fairseq_model.py", line 58, in DistributedFairseqModel
wrapped_model = DistributedDataParallel(
File "/data3/syxu/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 580, in __init__
self._sync_params_and_buffers(authoritative_rank=0)
File "/data3/syxu/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 597, in _sync_params_and_buffers
self._distributed_broadcast_coalesced(
File "/data3/syxu/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 1334, in _distributed_broadcast_coalesced
dist._broadcast_coalesced(
TypeError: _broadcast_coalesced(): incompatible function arguments. The following argument types are supported:
1. (process_group: torch._C._distributed_c10d.ProcessGroup, tensors: List[at::Tensor], buffer_size: int, src: int = 0) -> None
solve
Do not use the DistributedDataParallel. according to file , This is in fairseq It is embodied in –ddp-backend Parameters .
When reporting a mistake –ddp-backend=pytorch_ddp
( Default ), Change it to legacy_ddp
、no_c10d
No more errors will be reported .
Reference resources
https://fairseq.readthedocs.io/en/latest/command_line_tools.html
https://blog.csdn.net/j___t/article/details/104368597
边栏推荐
- Nat. Comm. | 使用Tensor-cell2cell对细胞通讯进行环境感知去卷积
- 树莓派如何连接WiFi
- 重绘和回流
- [mathematical logic] predicate logic (toe normal form | toe normal form conversion method | basic equivalence of predicate logic | name changing rules | predicate logic reasoning law)
- How to download pytorch? Where can I download pytorch?
- xrandr修改分辨率与刷新率
- Wechat applet + Alibaba IOT platform + Hezhou air724ug built with server version system analysis
- 服务器无法远程连接原因分析
- [Blue Bridge Road -- bug free code] DS18B20 temperature reading code analysis
- PostgreSQL database high availability Patroni source code learning - etcd class
猜你喜欢
How to download pytorch? Where can I download pytorch?
国产PC系统完成闭环,替代美国软硬件体系的时刻已经到来
nodejs基础:浅聊url和querystring模块
[Apple Photo Album push] IMessage group anchor local push
CVPR 2022 | Dalian Technology propose un cadre d'éclairage auto - étalonné pour l'amélioration de l'image de faible luminosité de la scène réelle
CVPR 2022 | Dalian Institute of technology proposes a self calibration lighting framework for low light level image enhancement of real scenes
JMeter starts from zero (III) -- simple use of regular expressions
When writing a web project, SmartUpload is used for file upload and new string () is used for transcoding, but in the database, there will still be random codes similar to poker
Pdf editing tool movavi pdfchef 2022 direct download
JS realizes the animation effect of text and pictures in the visual area
随机推荐
JMeter starts from zero (III) -- simple use of regular expressions
[set theory] set operation (Union | intersection | disjoint | relative complement | symmetric difference | absolute complement | generalized union | generalized intersection | set operation priority)
How does the pytorch project run?
因果AI,下一代可信AI的产业升级新范式?
Interface in TS
Nodejs Foundation: shallow chat URL and querystring module
Five elements of user experience
2022 mobile crane driver examination registration and mobile crane driver operation examination question bank
重绘和回流
JS实现图片懒加载
树莓派如何连接WiFi
Busycal latest Chinese version
xrandr修改分辨率與刷新率
QSAR model establishment script based on pytoch and rdkit
sd卡数据损坏怎么回事,sd卡数据损坏怎么恢复
2022 tea master (intermediate) examination questions and analysis and tea master (intermediate) practical examination video
服务器无法远程连接原因分析
What can learning pytorch do?
Nat. Comm. | use tensor cell2cell to deconvolute cell communication with environmental awareness
[mathematical logic] predicate logic (judge whether the first-order predicate logic formula is true or false | explain | example | predicate logic formula type | forever true | forever false | satisfi