minor fixes for wavent and modules
This commit is contained in:
parent
d77557b1a2
commit
67613951d5
|
@ -313,6 +313,7 @@ class WaveNet(dg.Layer):
|
||||||
"""
|
"""
|
||||||
# Causal Conv
|
# Causal Conv
|
||||||
if self.loss_type == "softmax":
|
if self.loss_type == "softmax":
|
||||||
|
x = F.clip(x, min=-1., max=0.99999)
|
||||||
x = quantize(x, self.output_dim)
|
x = quantize(x, self.output_dim)
|
||||||
x = self.embed(x) # (B, T, C), T=1
|
x = self.embed(x) # (B, T, C), T=1
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -86,7 +86,7 @@ class Conv1D(dg.Conv2D):
|
||||||
stride=1,
|
stride=1,
|
||||||
padding=0,
|
padding=0,
|
||||||
dilation=1,
|
dilation=1,
|
||||||
groups=None,
|
groups=1,
|
||||||
param_attr=None,
|
param_attr=None,
|
||||||
bias_attr=None,
|
bias_attr=None,
|
||||||
use_cudnn=True,
|
use_cudnn=True,
|
||||||
|
@ -128,7 +128,7 @@ class Conv1DTranspose(dg.Conv2DTranspose):
|
||||||
padding=0,
|
padding=0,
|
||||||
stride=1,
|
stride=1,
|
||||||
dilation=1,
|
dilation=1,
|
||||||
groups=None,
|
groups=1,
|
||||||
param_attr=None,
|
param_attr=None,
|
||||||
bias_attr=None,
|
bias_attr=None,
|
||||||
use_cudnn=True,
|
use_cudnn=True,
|
||||||
|
@ -179,7 +179,7 @@ class Conv1DCell(Conv1D):
|
||||||
filter_size,
|
filter_size,
|
||||||
dilation=1,
|
dilation=1,
|
||||||
causal=False,
|
causal=False,
|
||||||
groups=None,
|
groups=1,
|
||||||
param_attr=None,
|
param_attr=None,
|
||||||
bias_attr=None,
|
bias_attr=None,
|
||||||
use_cudnn=True,
|
use_cudnn=True,
|
||||||
|
|
|
@ -160,7 +160,7 @@ def Conv1D(num_channels,
|
||||||
stride=1,
|
stride=1,
|
||||||
padding=0,
|
padding=0,
|
||||||
dilation=1,
|
dilation=1,
|
||||||
groups=None,
|
groups=1,
|
||||||
param_attr=None,
|
param_attr=None,
|
||||||
bias_attr=None,
|
bias_attr=None,
|
||||||
use_cudnn=True,
|
use_cudnn=True,
|
||||||
|
@ -179,7 +179,7 @@ def Conv1DTranspose(num_channels,
|
||||||
padding=0,
|
padding=0,
|
||||||
stride=1,
|
stride=1,
|
||||||
dilation=1,
|
dilation=1,
|
||||||
groups=None,
|
groups=1,
|
||||||
param_attr=None,
|
param_attr=None,
|
||||||
bias_attr=None,
|
bias_attr=None,
|
||||||
use_cudnn=True,
|
use_cudnn=True,
|
||||||
|
@ -197,7 +197,7 @@ def Conv1DCell(num_channels,
|
||||||
filter_size,
|
filter_size,
|
||||||
dilation=1,
|
dilation=1,
|
||||||
causal=False,
|
causal=False,
|
||||||
groups=None,
|
groups=1,
|
||||||
param_attr=None,
|
param_attr=None,
|
||||||
bias_attr=None,
|
bias_attr=None,
|
||||||
use_cudnn=True,
|
use_cudnn=True,
|
||||||
|
@ -216,7 +216,7 @@ def Conv2D(num_channels,
|
||||||
stride=1,
|
stride=1,
|
||||||
padding=0,
|
padding=0,
|
||||||
dilation=1,
|
dilation=1,
|
||||||
groups=None,
|
groups=1,
|
||||||
param_attr=None,
|
param_attr=None,
|
||||||
bias_attr=None,
|
bias_attr=None,
|
||||||
use_cudnn=True,
|
use_cudnn=True,
|
||||||
|
@ -237,7 +237,7 @@ def Conv2DTranspose(num_channels,
|
||||||
padding=0,
|
padding=0,
|
||||||
stride=1,
|
stride=1,
|
||||||
dilation=1,
|
dilation=1,
|
||||||
groups=None,
|
groups=1,
|
||||||
param_attr=None,
|
param_attr=None,
|
||||||
bias_attr=None,
|
bias_attr=None,
|
||||||
use_cudnn=True,
|
use_cudnn=True,
|
||||||
|
|
Loading…
Reference in New Issue