update funasr-onnx

This commit is contained in:
shixian.shi 2024-01-10 11:23:41 +08:00
parent f79d31d860
commit e30a17cf4e

View File

@ -28,7 +28,7 @@ def pad_list(xs, pad_value, max_len=None):
max_len = max(x.size(0) for x in xs)
# pad = xs[0].new(n_batch, max_len, *xs[0].size()[1:]).fill_(pad_value)
# numpy format
pad = np.zeros((n_batch, max_len)).astype(np.int32)
pad = (np.zeros((n_batch, max_len)) + pad_value).astype(np.int32)
for i in range(n_batch):
pad[i, : xs[i].shape[0]] = xs[i]