Skip to content

Commit

Permalink
remove paddle.fluid (#2741)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxcd authored Dec 13, 2022
1 parent 9064b93 commit c54c950
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions paddlespeech/s2t/models/whisper/whipser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import numpy as np
import paddle
import paddle.fluid as fluid
import paddle.nn.functional as F
import soundfile
import tqdm
Expand Down Expand Up @@ -231,8 +230,8 @@ def __init__(self,
])
self.ln = LayerNorm(n_state)

mask = fluid.layers.fill_constant(
shape=[n_ctx, n_state], value=-np.inf, dtype='float32')
mask = paddle.full(
shape=[n_ctx, n_state], fill_value=-np.inf, dtype='float32')
mask = paddle.triu(mask, diagonal=1)
self.register_buffer("mask", mask, persistable=False)

Expand Down

0 comments on commit c54c950

Please sign in to comment.