From 0ca6876f5814aeb6802e050223427ff510a4a160 Mon Sep 17 00:00:00 2001
From: haoneng.lhn <haoneng.lhn@alibaba-inc.com>
Date: 星期一, 03 四月 2023 14:15:51 +0800
Subject: [PATCH] update

---
 funasr/models/decoder/sanm_decoder.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/funasr/models/decoder/sanm_decoder.py b/funasr/models/decoder/sanm_decoder.py
index 3bfcffc..a36d95e 100644
--- a/funasr/models/decoder/sanm_decoder.py
+++ b/funasr/models/decoder/sanm_decoder.py
@@ -94,7 +94,7 @@
         if self.self_attn:
             if self.normalize_before:
                 tgt = self.norm2(tgt)
-            x, _ = self.self_attn(tgt, tgt_mask)
+            x, cache = self.self_attn(tgt, tgt_mask, cache=cache)
             x = residual + self.dropout(x)
 
         if self.src_attn is not None:
@@ -103,7 +103,6 @@
                 x = self.norm3(x)
 
             x = residual + self.dropout(self.src_attn(x, memory, memory_mask))
-
 
         return x, tgt_mask, memory, memory_mask, cache
 

--
Gitblit v1.9.1