Apply suggestions from code review

pull/3928/head
张春乔 9 months ago committed by GitHub
parent c09c9883b6
commit abb97bc5a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -171,7 +171,8 @@ class AttLoc(nn.Layer):
if paddle.sum(att_prev) == 0:
# if no bias, 0 0-pad goes 0
att_prev = 1.0 - make_pad_mask(enc_hs_len)
att_prev = att_prev / enc_hs_len.unsqueeze(-1).astype(att_prev.dtype)
att_prev = att_prev / enc_hs_len.unsqueeze(-1).astype(
att_prev.dtype)
# att_prev: (utt, frame) -> (utt, 1, 1, frame)
# -> (utt, att_conv_chans, 1, frame)

Loading…
Cancel
Save