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

generate function falls at last hurdle #36

Open
markhanslip opened this issue Feb 26, 2020 · 0 comments
Open

generate function falls at last hurdle #36

markhanslip opened this issue Feb 26, 2020 · 0 comments

Comments

@markhanslip
Copy link

firstly thanks so much for the implementation :)
all runs fine until end of generate function, when this happens:

RuntimeError Traceback (most recent call last)
in
9 first_samples=start_data,
10 #progress_callback=prog_callback, - need to add this to wavenet_model.py
---> 11 temperature=1.)

~/WaveNet/wavenet_model.py in generate(self, num_samples, first_samples, temperature)
230
231 generated = (generated / self.classes) * 2. - 1
--> 232 mu_gen = mu_law_expansion(generated, self.classes)
233
234 self.train()

~/WaveNet/audio_data.py in mu_law_expansion(data, mu)
155
156 def mu_law_expansion(data, mu):
--> 157 s = np.sign(data) * (np.exp(np.abs(data) * np.log(mu + 1)) - 1) / mu
158 return s

RuntimeError: Expected object of type torch.LongTensor but found type torch.DoubleTensor for argument #2 'other'

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

1 participant