remove paddle.fluid (#2740)

pull/2745/head
zxcd 2 years ago committed by GitHub
parent 12fa8a2d19
commit a8a240d4ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,7 +16,6 @@ from typing import Union
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid
import paddle.nn.functional as F import paddle.nn.functional as F
import soundfile import soundfile
import tqdm import tqdm
@ -231,8 +230,8 @@ class TextDecoder(nn.Layer):
]) ])
self.ln = LayerNorm(n_state) self.ln = LayerNorm(n_state)
mask = fluid.layers.fill_constant( mask = paddle.full(
shape=[n_ctx, n_state], value=-np.inf, dtype='float32') shape=[n_ctx, n_state], fill_value=-np.inf, dtype='float32')
mask = paddle.triu(mask, diagonal=1) mask = paddle.triu(mask, diagonal=1)
self.register_buffer("mask", mask, persistable=False) self.register_buffer("mask", mask, persistable=False)

Loading…
Cancel
Save