GithubHelp home page GithubHelp logo

Comments (4)

 avatar commented on August 18, 2024

@Mao-JianGuo your solution can fix the error occured in training step

But, when the model is trained out, excuting synthesize.py would report the error below:

Traceback (most recent call last):
File "synthesize.py", line 99, in
synthesize(model, waveglow, melgan, text, sentence, prefix='step_{}'.format(args.step))
File "synthesize.py", line 47, in synthesize
mel, mel_postnet, log_duration_output, f0_output, energy_output, _, _, mel_len = model(text, src_len)
File "/home/op/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/op/.local/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 153, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/op/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/op/repo/github.com/ming024/FastSpeech2/fastspeech2.py", line 39, in forward
encoder_output, src_mask, mel_mask, d_target, p_target, e_target, max_mel_len)
File "/home/op/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/op/repo/github.com/ming024/FastSpeech2/modules.py", line 51, in forward
pitch_embedding = self.pitch_embedding(torch.bucketize(nn.Parameter(pitch_prediction), nn.Parameter(self.pitch_bins)))
RuntimeError: isDifferentiableType(variable.scalar_type()) INTERNAL ASSERT FAILED at "/pytorch/torch/csrc/autograd/functions/utils.h":59, please report a bug to PyTorch.

from fastspeech2.

Curry-AI avatar Curry-AI commented on August 18, 2024

In modules.py change
pitch_embedding = self.pitch_embedding(torch.bucketize(pitch_prediction, self.pitch_bins))
energy_embedding = self.energy_embedding(torch.bucketize(energy_prediction, self.energy_bins))

to
pitch_embedding = self.pitch_embedding(torch.bucketize(torch.tensor(pitch_prediction.data), self.pitch_bins))
energy_embedding = self.energy_embedding(torch.bucketize(torch.tensor(energy_prediction.data), self.energy_bins))

from fastspeech2.

 avatar commented on August 18, 2024

It worked!!! Thank you very much.

Now, I know the reason of this reported err.
The torch version author used is "torch==1.6.0.dev20200428".

from fastspeech2.

ming024 avatar ming024 commented on August 18, 2024

Thank you all, closed #14

from fastspeech2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.