minor fixes for wavent and modules

This commit is contained in:
chenfeiyu 2020-03-21 11:52:15 +00:00
parent d77557b1a2
commit 67613951d5
3 changed files with 9 additions and 8 deletions

View File

@ -313,6 +313,7 @@ class WaveNet(dg.Layer):
"""
# Causal Conv
if self.loss_type == "softmax":
x = F.clip(x, min=-1., max=0.99999)
x = quantize(x, self.output_dim)
x = self.embed(x) # (B, T, C), T=1
else:

View File

@ -86,7 +86,7 @@ class Conv1D(dg.Conv2D):
stride=1,
padding=0,
dilation=1,
groups=None,
groups=1,
param_attr=None,
bias_attr=None,
use_cudnn=True,
@ -128,7 +128,7 @@ class Conv1DTranspose(dg.Conv2DTranspose):
padding=0,
stride=1,
dilation=1,
groups=None,
groups=1,
param_attr=None,
bias_attr=None,
use_cudnn=True,
@ -179,7 +179,7 @@ class Conv1DCell(Conv1D):
filter_size,
dilation=1,
causal=False,
groups=None,
groups=1,
param_attr=None,
bias_attr=None,
use_cudnn=True,

View File

@ -160,7 +160,7 @@ def Conv1D(num_channels,
stride=1,
padding=0,
dilation=1,
groups=None,
groups=1,
param_attr=None,
bias_attr=None,
use_cudnn=True,
@ -179,7 +179,7 @@ def Conv1DTranspose(num_channels,
padding=0,
stride=1,
dilation=1,
groups=None,
groups=1,
param_attr=None,
bias_attr=None,
use_cudnn=True,
@ -197,7 +197,7 @@ def Conv1DCell(num_channels,
filter_size,
dilation=1,
causal=False,
groups=None,
groups=1,
param_attr=None,
bias_attr=None,
use_cudnn=True,
@ -216,7 +216,7 @@ def Conv2D(num_channels,
stride=1,
padding=0,
dilation=1,
groups=None,
groups=1,
param_attr=None,
bias_attr=None,
use_cudnn=True,
@ -237,7 +237,7 @@ def Conv2DTranspose(num_channels,
padding=0,
stride=1,
dilation=1,
groups=None,
groups=1,
param_attr=None,
bias_attr=None,
use_cudnn=True,