Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ask for help #6

Open
li-xx-5 opened this issue Dec 21, 2018 · 1 comment
Open

ask for help #6

li-xx-5 opened this issue Dec 21, 2018 · 1 comment

Comments

@li-xx-5
Copy link

li-xx-5 commented Dec 21, 2018

hi,i met the erro,when i ran train.py,how can i solve the problem?thank you

Traceback (most recent call last):
File "train.py", line 180, in
train_fn(args)
File "train.py", line 157, in train_fn
waveform = mu_law_decode(np.asarray(samples[model.module.receptive_field:]),hparams.quantization_channels)
File "/usr/local/lib/python3.6/dist-packages/numpy/core/numeric.py", line 492, in asarray
return array(a, dtype, copy=False, order=order)
File "/usr/local/lib/python3.6/dist-packages/torch/tensor.py", line 450, in array
return self.numpy()
TypeError: can't convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

@szokejokepu
Copy link

You have to change it to samples[model.module.receptive_field:].cpu().numpy()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants