deepsound-project / samplernn-pytorch

PyTorch implementation of SampleRNN: An Unconditional End-to-End Neural Audio Generation Model
MIT License
288 stars 75 forks source link

bug in hidden state? #32

Closed qiuqiangkong closed 5 years ago

qiuqiangkong commented 6 years ago

Hi,

Thanks for the good work! I am wondering should https://github.com/deepsound-project/samplernn-pytorch/blob/master/model.py#L49 be:

h0 = torch.zeros(n_rnn, batch_size, dim)?

I noticed the expand function is used later, but it seems using the expand function the values are shared. Is this a bug? 

Many thanks!

Qiuqiang

qiuqiangkong commented 5 years ago

I found the .contiguous() function fixed this problem.