Open sylvchev opened 5 years ago
Works for me on 0.4
The code in demo.ipynb requires saber dataset. Where is this dataset?
I switched to the only available dataset in this repo: bach/chaconne, but then I get an error message that ends with :
RuntimeError Traceback (most recent call last)
Turns out the solution is to put the arguments dtype=dtype, ltype=ltype into the function WaveNetTrainer(), like so:
trainer = WavenetTrainer(model=model,
dataset=data,
lr=0.001,
weight_decay=0.0,
gradient_clipping=None,
snapshot_path='snapshots',
# snapshot_name='saber_model',
snapshot_name='bach_model',
snapshot_interval=100000,
dtype=dtype,
ltype=ltype,
)
Credit to @ianmktu.
Also you need to move the model to cuda
if use_cuda: model.cuda()
Using pytorch-0.4.1 to run this code, I encountered several problems. I'm creating this pull request to propose a solution to these issues. One blocking issue is related with
generate_fast()
that raise aRuntimeError: the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (2)
I also modified to code to avoid warnings:item()
Variable
are deprecated in favor ofrequires_grad
argsUnfortunately, I could not verify that these modifications are functional on pytorch < 0.4. I'll try to install pytorch 0.3 on another system and see if it is backward compatible.
Thank you very much for this nice code, I was a huge help to understand WaveNet! I hope I could contribute to this project.