antecessor / Wavenet

Implementation of Wavenet in torch
16 stars 7 forks source link

mat1 and mat2 shapes cannot be multiplied (8x4 and 5x11) #3

Open VanBuren77 opened 2 years ago

VanBuren77 commented 2 years ago

Currently getting this error from the notebook:

RuntimeError: mat1 and mat2 shapes cannot be multiplied (8x4 and 5x11)

Downloaded the data from here:

https://www.kaggle.com/competitions/liverpool-ion-switching/data?select=sample_submission.csv

Any idea why this is erroring out?

elianlaura commented 1 year ago

I get the same error.

qiemanqieman commented 1 year ago

I got the same error too.

But I fix it by changing self.liner=nn.Linear(seqLen-self.wavenet.calculateReceptiveField(),output_size) to self.liner=nn.Linear(seqLen-self.wavenet.calculateReceptiveField()-1,output_size)

And I think maybe this is because the output size of WaveNet is actually calculated in a little wrong way.

AaronPeng920 commented 1 year ago

In WaveNet model, class WaveNet, function forward, the two line x = self.casualConv1D(x) & skipSize = self.calculateOutputSize(x), the x.shape is not the origin shape of the audio, because the function CasualDilatedConv1D.forward use list slice.

AaronPeng920 commented 1 year ago

In WaveNet model, class WaveNet, function forward, the two line x = self.casualConv1D(x) & skipSize = self.calculateOutputSize(x), the x.shape is not the origin shape of the audio, because the function CasualDilatedConv1D.forward use list slice.