vincentherrmann / pytorch-wavenet

An implementation of WaveNet with fast generation
MIT License
968 stars 225 forks source link

Tensors accidentally sharing memory #13

Closed Ljferrer closed 6 years ago

Ljferrer commented 6 years ago

Hey, I noticed a potential issue on line 154 in wavenet_model.py

https://github.com/vincentherrmann/pytorch-wavenet/blob/2b7bfb20e1e6b65dd8bcfbea84095e387eee286c/wavenet_model.py#L154

I haven't done a deep dive to confirm, but I'm guessing this line is causing the 's' and 'x' tensors to share the same memory.

I think this would fix it: s = x.clone()

Hope this helps!