From e30a17cf4e715b3d139fa1e0ba01cda1bcf0f884 Mon Sep 17 00:00:00 2001
From: shixian.shi <shixian.shi@alibaba-inc.com>
Date: 星期三, 10 一月 2024 11:23:41 +0800
Subject: [PATCH] update funasr-onnx

---
 runtime/python/onnxruntime/funasr_onnx/utils/utils.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/runtime/python/onnxruntime/funasr_onnx/utils/utils.py b/runtime/python/onnxruntime/funasr_onnx/utils/utils.py
index 1e7f880..768b813 100644
--- a/runtime/python/onnxruntime/funasr_onnx/utils/utils.py
+++ b/runtime/python/onnxruntime/funasr_onnx/utils/utils.py
@@ -28,7 +28,7 @@
         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]
 

--
Gitblit v1.9.1