From e154b8f926471c5b876856c46f2ba09cbb22a3d5 Mon Sep 17 00:00:00 2001 From: zxcd <228587199@qq.com> Date: Wed, 14 May 2025 19:02:10 +0800 Subject: [PATCH] fix (#4071) --- paddlespeech/t2s/modules/tacotron2/attentions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddlespeech/t2s/modules/tacotron2/attentions.py b/paddlespeech/t2s/modules/tacotron2/attentions.py index 86407e778..72d1b1375 100644 --- a/paddlespeech/t2s/modules/tacotron2/attentions.py +++ b/paddlespeech/t2s/modules/tacotron2/attentions.py @@ -173,6 +173,8 @@ class AttLoc(nn.Layer): att_prev = 1.0 - make_pad_mask(enc_hs_len) att_prev = att_prev / enc_hs_len.unsqueeze(-1).astype( att_prev.dtype) + else: + att_prev.unsqueeze(-1) # att_prev: (utt, frame) -> (utt, 1, 1, frame) # -> (utt, att_conv_chans, 1, frame)