- PaddlePaddle 2.4.1
- Python 3.7
- Ubuntu or Windows
错误如下:
File "E:\PyCharm\PPASR\ppasr\model_utils\efficient_conformer\encoder.py", line 341, in forward_chunk
for i, layer in enumerate(self.encoders):
File "E:\PyCharm\PPASR\ppasr\model_utils\efficient_conformer\encoder.py", line 347, in forward_chunk
xs, _, new_att_cache, new_cnn_cache = layer(
File "E:\PyCharm\PPASR\ppasr\model_utils\conformer\encoder.py", line 394, in forward
x_att, new_att_cache = self.self_attn(x, x, x, mask, pos_emb, cache=att_cache)
File "E:\PyCharm\PPASR\ppasr\model_utils\efficient_conformer\attention.py", line 176, in forward
q, k, v, p, mask, padding_q = self.pad4group(q, k, v, p, mask, self.group_size)
File "E:\PyCharm\PPASR\ppasr\model_utils\efficient_conformer\attention.py", line 59, in pad4group
# Input Padding (B, T, D) -> (B, T + P, D)
print(Q.shape)
Q = F.pad(Q, (0, 0, 0, padding_Q), mode='constant', value=0.0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
K = F.pad(K, (0, 0, 0, padding_KV), mode='constant', value=0.0)
V = F.pad(V, (0, 0, 0, padding_KV), mode='constant', value=0.0)
File "D:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\nn\functional\common.py", line 1724, in pad
helper.append_op(
File "D:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\layer_helper.py", line 45, in append_op
return self.main_program.current_block().append_op(*args, **kwargs)
File "D:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\framework.py", line 4017, in append_op
op = Operator(
File "D:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\framework.py", line 2991, in __init__
self._update_desc_attr(attr_name, attr_val)
File "D:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\framework.py", line 3339, in _update_desc_attr
self._update_desc_plain_attr(name, val)
File "D:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\framework.py", line 3363, in _update_desc_plain_attr
desc._set_int32s_attr(name, val)
TypeError: _set_int32s_attr(): incompatible function arguments. The following argument types are supported:
1. (self: paddle.fluid.libpaddle.OpDesc, arg0: str, arg1: List[int]) -> None
Invoked with: <paddle.fluid.libpaddle.OpDesc object at 0x0000028BC900D7B0>, 'paddings', [0, 0, 0, var tmp_36 : LOD_TENSOR.shape(1,).dtype(int32).stop_gradient(False), 0, 0]