From 3f8294b9d7deaa0cbdb0b2ef6f3802d46ae133a9 Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期三, 25 十二月 2024 17:16:11 +0800
Subject: [PATCH] Revert "shfit to shift (#2266)" (#2336)
---
funasr/models/sanm/encoder.py | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/funasr/models/sanm/encoder.py b/funasr/models/sanm/encoder.py
index b590e24..0d39ca7 100644
--- a/funasr/models/sanm/encoder.py
+++ b/funasr/models/sanm/encoder.py
@@ -69,7 +69,7 @@
self.stochastic_depth_rate = stochastic_depth_rate
self.dropout_rate = dropout_rate
- def forward(self, x, mask, cache=None, mask_shift_chunk=None, mask_att_chunk_encoder=None):
+ def forward(self, x, mask, cache=None, mask_shfit_chunk=None, mask_att_chunk_encoder=None):
"""Compute encoded features.
Args:
@@ -106,7 +106,7 @@
self.self_attn(
x,
mask,
- mask_shift_chunk=mask_shift_chunk,
+ mask_shfit_chunk=mask_shfit_chunk,
mask_att_chunk_encoder=mask_att_chunk_encoder,
),
),
@@ -122,7 +122,7 @@
self.self_attn(
x,
mask,
- mask_shift_chunk=mask_shift_chunk,
+ mask_shfit_chunk=mask_shfit_chunk,
mask_att_chunk_encoder=mask_att_chunk_encoder,
)
)
@@ -131,7 +131,7 @@
self.self_attn(
x,
mask,
- mask_shift_chunk=mask_shift_chunk,
+ mask_shfit_chunk=mask_shfit_chunk,
mask_att_chunk_encoder=mask_att_chunk_encoder,
)
)
@@ -145,7 +145,7 @@
if not self.normalize_before:
x = self.norm2(x)
- return x, mask, cache, mask_shift_chunk, mask_att_chunk_encoder
+ return x, mask, cache, mask_shfit_chunk, mask_att_chunk_encoder
def forward_chunk(self, x, cache=None, chunk_size=None, look_back=0):
"""Compute encoded features.
@@ -212,7 +212,7 @@
interctc_layer_idx: List[int] = [],
interctc_use_conditioning: bool = False,
kernel_size: int = 11,
- sanm_shift: int = 0,
+ sanm_shfit: int = 0,
lora_list: List[str] = None,
lora_rank: int = 8,
lora_alpha: int = 16,
@@ -299,7 +299,7 @@
output_size,
attention_dropout_rate,
kernel_size,
- sanm_shift,
+ sanm_shfit,
lora_list,
lora_rank,
lora_alpha,
@@ -312,7 +312,7 @@
output_size,
attention_dropout_rate,
kernel_size,
- sanm_shift,
+ sanm_shfit,
lora_list,
lora_rank,
lora_alpha,
--
Gitblit v1.9.1