WaveNet icon indicating copy to clipboard operation
WaveNet copied to clipboard

Failed generate sample after tuning network architecture

Open qq184861643 opened this issue 8 years ago • 2 comments

I've changed your CausalConv1d as below: `class CausualConv1d(nn.Module): def init(self,in_channels,out_channels,kernel_size=2,stride=1,dilation=1,bias=True): super(CausalConv1d,self).init()

	self.pad = (kernel_size - 1) * dilation
	self.conv = nn.Conv1d(in_channels,out_channels,kernel_size,stride=stride,padding=self.pad,dilation=dilation,bias=bias)

def forward(self,inputs):
	
	outputs = self.conv(inputs)
	return outputs[:,:,:-self.pad]

`

And then I replace filter_conv and gate_conv in class ResidualBlock from DilatedConv1d to my CausalConv1d. I found this architecture from the original Tensorflow code. Theoretically, the receptive field of the networks remains unchanged. And things went well during training. However, it caused a cuda runtime error(59):device-side assert triggered at /opt/conda/conda-bld/pytorch_1522182087074/work/torch/lib/THC/THCTensorCopy.cu:204 when I tried to use your generate_sample.ipynb. I tried to solve this for a day without any solutions. I wonder if there's any chance that you know why this happens. Thank you for reading and if, for answering.

qq184861643 avatar Apr 14 '18 09:04 qq184861643

I dont know why inserted code is arranged like that, sorry

qq184861643 avatar Apr 14 '18 09:04 qq184861643

I've figured out that the new architecture would lead the outputs larger than the inputs with few order of magnitudes, but I still dont know why...

qq184861643 avatar Apr 14 '18 10:04 qq184861643