From b3fb4c0acd5f52a313f024b6f69b8f025c6eddfe Mon Sep 17 00:00:00 2001
From: ming030890 <67713085+ming030890@users.noreply.github.com>
Date: 星期二, 05 八月 2025 17:48:10 +0800
Subject: [PATCH] Allow one to set a custom progress callback (#2609)
---
funasr/models/sond/encoder/fsmn_encoder.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/funasr/models/sond/encoder/fsmn_encoder.py b/funasr/models/sond/encoder/fsmn_encoder.py
index 5bccf43..9ec9912 100644
--- a/funasr/models/sond/encoder/fsmn_encoder.py
+++ b/funasr/models/sond/encoder/fsmn_encoder.py
@@ -36,12 +36,12 @@
right_padding = kernel_size - 1 - left_padding
self.pad_fn = nn.ConstantPad1d((left_padding, right_padding), 0.0)
- def forward(self, inputs, mask, mask_shift_chunk=None):
+ def forward(self, inputs, mask, mask_shfit_chunk=None):
b, t, d = inputs.size()
if mask is not None:
mask = torch.reshape(mask, (b, -1, 1))
- if mask_shift_chunk is not None:
- mask = mask * mask_shift_chunk
+ if mask_shfit_chunk is not None:
+ mask = mask * mask_shfit_chunk
inputs = inputs * mask
x = inputs.transpose(1, 2)
--
Gitblit v1.9.1