当前位置:网站首页>[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
边栏推荐
- Appium自动化测试框架
- Deep dive kotlin synergy (19): flow overview
- [Chongqing Guangdong education] reference materials for design and a better life of Zhongyuan Institute of science and technology
- leetcode:297. Serialization and deserialization of binary tree
- Is pytorch difficult to learn? How to learn pytorch well?
- Application of I2C protocol of STM32F103 (read and write EEPROM)
- 竞品分析撰写
- JS实现图片懒加载
- Debug: CD cannot be used in kaggle
- Basic syntax of class
猜你喜欢

【刷题篇】接雨水(一维)
![[brush questions] connected with rainwater (one dimension)](/img/21/318fcb444b17be887562f4a9c1fac2.png)
[brush questions] connected with rainwater (one dimension)

Arduino application development - LCD display GIF dynamic diagram
![[nlp] - brief introduction to the latest work of spark neural network](/img/65/35ae0137f4030bdb2b0ab9acd85e16.png)
[nlp] - brief introduction to the latest work of spark neural network

【毕业季·进击的技术er】职场人的自白

js实现在可视区内,文字图片动画效果

CVPR 2022 | Dalian Institute of technology proposes a self calibration lighting framework for low light level image enhancement of real scenes

The 10th China Cloud Computing Conference · China Station: looking forward to the trend of science and technology in the next decade

JS native common knowledge

Mila、渥太华大学 | 用SE(3)不变去噪距离匹配进行分子几何预训练
随机推荐
Is it better to speculate in the short term or the medium and long term? Comparative analysis of differences
x Problem B
redis 持久化原理
[set theory] set concept and relationship (set represents | number set | set relationship | contains | equality | set relationship property)
eth入门之简介
深潜Kotlin协程(十九):Flow 概述
Which code editor is easy to use? Code editing software recommendation
重绘和回流
Xrandr modifier la résolution et le taux de rafraîchissement
sklearn数据预处理
"Designer universe" argument: Data Optimization in the design field is finally reflected in cost, safety and health | chinabrand.com org
『期末复习』16/32位微处理器(8086)基本寄存器
2022-07-02:以下go语言代码输出什么?A:编译错误;B:Panic;C:NaN。 package main import “fmt“ func main() { var a =
Taking two column waterfall flow as an example, how should we build an array of each column
树莓派如何连接WiFi
[set theory] set concept and relationship (true subset | empty set | complete set | power set | number of set elements | power set steps)
Interaction free shell programming
[brush questions] connected with rainwater (one dimension)
2022 mobile crane driver examination registration and mobile crane driver operation examination question bank
[daily question] dichotomy - find a single dog (Bushi)