File size: 1,039 Bytes
4a3c603 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
## takes 3 positional arguments but 4 were given
```
File "C:\Users\xusong28\Miniconda3\envs\py3.7-torch1.7\lib\site-packages\transformers\models\bart\modeling_bart.py", line 988, in __init__
self.encoder = BartEncoder(config, self.shared)
File "C:\Users\xusong28\Miniconda3\envs\py3.7-torch1.7\lib\site-packages\transformers\models\bart\modeling_bart.py", line 636, in __init__
self.padding_idx,
TypeError: __init__() takes 3 positional arguments but 4 were given
```
用最新transformers
## not enough values to unpack (expected 2, got 1)
```
File "C:\Users\xusong28\Miniconda3\envs\py3.7-torch1.7-hf.latest\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "E:\workspace\python\fairseq\examples\kplug\hf\modeling_kplug_s2s_patch.py", line 25, in forward
bsz, seq_len = input_ids_shape[:2]
ValueError: not enough values to unpack (expected 2, got 1)
```
版本问题,已在 `modeling_kplug_s2s_patch.py` 中解决
用最新transformers |