未验证 提交 d5720e4e 编写于 作者: 小湉湉's avatar 小湉湉 提交者: GitHub

fix input dtype of elementwise_mul op from bool to int64 (#3054)

上级 31a4562a
......@@ -559,8 +559,9 @@ class VITSGenerator(nn.Layer):
y_lengths = paddle.cast(
paddle.clip(paddle.sum(dur, [1, 2]), min=1), dtype='int64')
y_mask = make_non_pad_mask(y_lengths).unsqueeze(1)
attn_mask = paddle.unsqueeze(x_mask, 2) * paddle.unsqueeze(y_mask,
-1)
tmp_a = paddle.cast(paddle.unsqueeze(x_mask, 2), dtype='int64')
tmp_b = paddle.cast(paddle.unsqueeze(y_mask, -1), dtype='int64')
attn_mask = tmp_a * tmp_b
attn = self._generate_path(dur, attn_mask)
# expand the length to match with the feature sequence
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册