From 2e36e738ca39afc8d02f3d11013bd12f937cc874 Mon Sep 17 00:00:00 2001
From: zhaomingwork <61895407+zhaomingwork@users.noreply.github.com>
Date: 星期三, 08 十一月 2023 09:22:06 +0800
Subject: [PATCH] fix bug for h5 hotwords (#1067)
---
funasr/export/models/modules/encoder_layer.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/funasr/export/models/modules/encoder_layer.py b/funasr/export/models/modules/encoder_layer.py
index 1da05f3..7d01397 100644
--- a/funasr/export/models/modules/encoder_layer.py
+++ b/funasr/export/models/modules/encoder_layer.py
@@ -61,7 +61,7 @@
if self.feed_forward_macaron is not None:
residual = x
x = self.norm_ff_macaron(x)
- x = residual + self.feed_forward_macaron(x)
+ x = residual + self.feed_forward_macaron(x) * 0.5
residual = x
x = self.norm_mha(x)
@@ -81,7 +81,7 @@
residual = x
x = self.norm_ff(x)
- x = residual + self.feed_forward(x)
+ x = residual + self.feed_forward(x) * 0.5
x = self.norm_final(x)
--
Gitblit v1.9.1