Skip to content

Commit

Permalink
fix input dtype of elementwise_mul op from bool to int64 (#3054)
Browse files Browse the repository at this point in the history
  • Loading branch information
yt605155624 committed Mar 16, 2023
1 parent 31a4562 commit d5720e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions paddlespeech/t2s/models/vits/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,9 @@ def inference(
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
Expand Down

0 comments on commit d5720e4

Please sign in to comment.