“3c7cde0ce1ec9669ecf6954bb9c4ab0daf94bf30”上不存在“mobile/src/operators/batchnorm_op.cpp”
未验证 提交 a1867c20 编写于 作者: 小湉湉's avatar 小湉湉 提交者: GitHub

fix slice bug of speedyspeech expand, test=tts (#1337)

上级 2170a5cb
......@@ -30,7 +30,9 @@ def expand(encodings: paddle.Tensor, durations: paddle.Tensor) -> paddle.Tensor:
k = 0
for j in range(t_enc):
d = durations[i, j]
M[i, k:k + d, j] = 1
# If the d == 0, slice action is meaningless and not supported
if d >= 1:
M[0, k:k + d, j] = 1
k += d
encodings = paddle.matmul(M, encodings)
return encodings
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册