question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Another issue of model failing to learn a sine wave.

See original GitHub issue

In https://github.com/ibab/tensorflow-wavenet/issues/141, the main discussion is about the slightly change in wave form when generating sine wave using quantization 256, which according to me is not the cause of noise. The trimming method is also not a problem because I disabled it in my test.

I tried to make the model learn to create the sin wave, but it turns out that it generates a totally noise audio. Here is a picture which I got from the plot generated_audio[7900:8100]. I use seed of the same sin wave audio file to eliminate the effect of initial seed. I even let the optimizer run through 500 steps to get the loss=0.0001, so the model overfits. As you can see from the picture, the first 100 points is the sine wave (a slightly change due to quantization) getting from the seed, but after that, when start to generate, the model fails.

Edit: I forget to test the fast_generation method. It can confirm that it is the cause of the problem. Relevant issue is from here: https://github.com/ibab/tensorflow-wavenet/issues/125.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jyegerlehnercommented, Nov 17, 2016

@fehiepsi mu-law encoding is very low resolution at the extreme ends of the range. If you scale it from -0.5 to 0.5 instead of -1.0 to 1.0 it will look (and sound) better.

1reaction
fehiepsicommented, Nov 17, 2016

@Zeta36 : it is not perfect, here is a picture

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does my neural net fail to learn higher frequency sine ...
At first glance it looks like your neural net might be doing about as well as it can given the information it has....
Read more >
Model fails to learn sine wave · Issue #141 - GitHub
With the default parameters (simply cloning the repo and training), the model could not fit a sine wave (I was intentionally trying to...
Read more >
Can Machine Learn the Concept of Sine | by Ying Xie
In our experiments we see that the models all learned the general shape of sine function, but failed to generate future data points...
Read more >
Neural network toy model to fit sine function fails, what's wrong?
Graduate student, new to Keras and neural networks was trying to fit a very simple feedforward neural network to a one-dimensional sine. I...
Read more >
Neural Networks Fail to Learn Periodic Functions and How to ...
As a fix of this problem, we propose a new activation, namely, x + sin2(x), which achieves the desired periodic inductive bias to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found