remove paddle.fluid (#2741)

r1.3 r1.3.0
zxcd 2 years ago committed by GitHub
parent 9064b93e2c
commit c54c9506aa
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 paddle
import paddle.fluid as fluid
import paddle.nn.functional as F
import soundfile
import tqdm
@ -231,8 +230,8 @@ class TextDecoder(nn.Layer):
])
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)

Loading…
Cancel
Save