Closed qiunlp closed 4 years ago
I cannot locate the error if not enough information is provided. Update your code to the latest patch, check whether your library versions match our requirements, and see whether you can reproduce the error.
Traceback (most recent call last):
File "/home/qwh/桌面/D_ATLOP/train.py", line 293, in
模块long_seq.py 中 output_attentions=True出错
当我去除 output_attentions=True时又出现另外一个错误: ine 45, in get_hrt e_att.append(attention[i, :, start + offset]) IndexError: too many indices for tensor of dimension 1
请问什么原因呢?谢谢!我是想改编成CPU版的
transformers版本太低,请更新到3.4.0
论文中公式(3)(4)(5)(6)(7)对应代码的哪一部分?谢谢指教
(3)(4)(5)对应的是enhanced baseline的classifier,没有在代码中实现。(6)(7)对应model.py 98 99行。
When I run train.py, there is an err in model.py:
line 45, in get_hrt e_att.append(attention[i, :, start + offset])
IndexError: too many indices for tensor of dimension 1
Thanks.