Upgrade waveflow api to 1.8.2

This commit is contained in:
Yibing Liu 2020-06-12 08:45:55 +00:00
parent b7c584e2f7
commit 33ed693ccf
3 changed files with 6 additions and 16 deletions

View File

@ -40,7 +40,7 @@ sudo apt-get install libsndfile1
### Install PaddlePaddle
See [install](https://www.paddlepaddle.org.cn/install/quick) for more details. This repo requires PaddlePaddle **1.8.0** or above.
See [install](https://www.paddlepaddle.org.cn/install/quick) for more details. This repo requires PaddlePaddle **1.8.2** or above.
### Install Parakeet

View File

@ -79,7 +79,7 @@ class Conditioner(dg.Layer):
stride=(1, s),
param_attr=param_attr,
bias_attr=bias_attr,
dtype="float32")
dtype=dtype)
self.upsample_conv2d.append(conv_trans2d)
for i, layer in enumerate(self.upsample_conv2d):
@ -88,12 +88,7 @@ class Conditioner(dg.Layer):
def forward(self, x):
x = fluid.layers.unsqueeze(x, 1)
for layer in self.upsample_conv2d:
in_dtype = x.dtype
if in_dtype == fluid.core.VarDesc.VarType.FP16:
x = fluid.layers.cast(x, "float32")
x = layer(x)
if in_dtype == fluid.core.VarDesc.VarType.FP16:
x = fluid.layers.cast(x, "float16")
x = fluid.layers.leaky_relu(x, alpha=0.4)
return fluid.layers.squeeze(x, [1])
@ -101,12 +96,7 @@ class Conditioner(dg.Layer):
def infer(self, x):
x = fluid.layers.unsqueeze(x, 1)
for layer in self.upsample_conv2d:
in_dtype = x.dtype
if in_dtype == fluid.core.VarDesc.VarType.FP16:
x = fluid.layers.cast(x, "float32")
x = layer(x)
if in_dtype == fluid.core.VarDesc.VarType.FP16:
x = fluid.layers.cast(x, "float16")
# Trim conv artifacts.
time_cutoff = layer._filter_size[1] - layer._stride[1]
x = fluid.layers.leaky_relu(x[:, :, :, :-time_cutoff], alpha=0.4)

View File

@ -55,7 +55,7 @@ setup_info = dict(
'inflect',
'librosa',
'unidecode',
'numba==0.48.0',
'numba==0.47.0',
'tqdm==4.19.8',
'matplotlib',
'tensorboardX',