From e04489ce4c0fd0095d0c79ef8f504f425e0435a8 Mon Sep 17 00:00:00 2001
From: Shi Xian <40013335+R1ckShi@users.noreply.github.com>
Date: 星期三, 13 三月 2024 16:34:42 +0800
Subject: [PATCH] contextual&seaco ONNX export (#1481)
---
funasr/models/paraformer_streaming/model.py | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/funasr/models/paraformer_streaming/model.py b/funasr/models/paraformer_streaming/model.py
index 518fe93..33ec976 100644
--- a/funasr/models/paraformer_streaming/model.py
+++ b/funasr/models/paraformer_streaming/model.py
@@ -579,14 +579,10 @@
decoder_class = tables.decoder_classes.get(kwargs["decoder"] + "Export")
self.decoder = decoder_class(self.decoder, onnx=is_onnx)
- from funasr.utils.torch_function import MakePadMask
from funasr.utils.torch_function import sequence_mask
-
- if is_onnx:
- self.make_pad_mask = MakePadMask(max_seq_len, flip=False)
- else:
- self.make_pad_mask = sequence_mask(max_seq_len, flip=False)
-
+
+
+ self.make_pad_mask = sequence_mask(max_seq_len, flip=False)
import copy
import types
--
Gitblit v1.9.1