golbin / wavenet Goto Github PK
View Code? Open in Web Editor NEWYet another WaveNet implementation in PyTorch.
Yet another WaveNet implementation in PyTorch.
Hi, thanks for the codes!
Although Figure 4 in the original paper is described as in your code, Eq. 2 (which I assume to be more correct) says there are two different convolutions, i.e., I think it should be
(ResidualBlock
)
def forward(self, x, skip_size)
input_tanh = self.dilated(x)
input_sigmoid = self.dilated(x)
# pixelCNN
gated_tanh = self.gated_tanh(input_tanh) # [-1, 1]
gated_sigmoid = self.gate_sigmoid(input_sigmoid) # [0, 1]
gated = gated_tanh * gated_sigmoid # [0, 1]
instead of
def forward(self, x, skip_size)
output = self.dilated(x)
# pixelCNN
gated_tanh = self.gated_tanh(output) # [-1, 1]
gated_sigmoid = self.gate_sigmoid(output) # [0, 1]
gated = gated_tanh * gated_sigmoid # [0, 1]
But I'm also guessing, have you possibly looked into it before?
Thank you for your code! It is documented very well!
What is the purpose of swapping the channels and timestep in the input tensor of WaveNet.forward()?
Line 243 in 0554533
The information about my computer is as below:
MacBook Pro (15-inch, 2017)
Processor: 2.9 GHz Intel Core i7
GPU: 16 GB 2133 MHz LPDDR3
I check the list of GPUs that supports CUDA and my GPU does appear on the list...
I also ran the test.py in this repository and there was no problem.
However, when I ran train.py, the program was killed after running for 3 minutes. I wonder if this is because my GPU does not support CUDA...
How to use this implementation for conditioned synthesis on spectrogram?
Hello,
I think your dilated convolution class, as implemented, is not causal because of the 0 padding.
The last comment here proposes a solution that might work better:
pytorch/pytorch#1333
The information about my computer is as below:
MacBook Pro (15-inch, 2017)
Processor: 2.9 GHz Intel Core i7
GPU: 16 GB 2133 MHz LPDDR3
I check the list of GPUs that supports CUDA and my GPU does appear on the list...
I also ran the test.py in this repository and there was no problem.
However, when I ran train.py, the program was killed after running for 3 minutes. I wonder if this is because my GPU does not support CUDA...
We tried to run train.py, but there were errors as below:
python3 train.py --data_dir="./test/data" --output_dir="./outputs"
THCudaCheck FAIL file=/pytorch/torch/lib/THC/generic/THCStorage.cu line=66 error=2 : out of memory
Traceback (most recent call last):
File "train.py", line 59, in
trainer = Trainer(args)
File "train.py", line 17, in init
lr=args.lr)
...
...
return super(_CudaBase, cls).new(cls, *args, **kwargs)
RuntimeError: cuda runtime error (2) : out of memory at /pytorch/torch/lib/THC/generic/THCStorage.cu:66
I don't know why.
Hi! I'm running the following command to train the model:
$ python train.py --data_dir=./test/data --output_dir=./outputs
The GPU I'm using has 16276MiB. However, I get an out of memory error immediately:
/wavenet/networks.py", line 88, in forward
gated = gated_tanh * gated_sigmoid
RuntimeError: cuda runtime error (2) : out of memory at /opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/THC/generic/THCStorage.cu:58
Any thoughts as to why this might be happening? Based on my calculations, the input size is 1x100,000x256 which should easily fit in the 16276 MiB of memory that the GPU has.
what does that mean of saying 'PyTorch >= 0.3.0'?
i cannot see the 0.3.0 version.
wavenet/utils/data.py
there should be a time shift between the input audio and the target audio , But not so in the code
Hi, I am running on a GeForce RTX3070 with 8GB.
I can train the model if I adjust the sample_size, which I interpret as batch_size.
However when generating, this parameter obviously does not help.
duration = generator.generate()
4885/14662 samples are generated. Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 39, in generate wavenet\model.py", line 71, in generate outputs = self.net(inputs) RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 8.00 GiB total capacity; 6.95 GiB already allocated; 0 bytes free; 7.31 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
Any Tips on how to avoid this? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.