{"action":"created","issue":{"url":"https://api.github.com/repos/ibab/tensorflow-wavenet/issues/141","repository_url":"https://api.github.com/repos/ibab/tensorflow-wavenet","labels_url":"https://api.github.com/repos/ibab/tensorflow-wavenet/issues/141/labels{/name}","comments_url":"https://api.github.com/repos/ibab/tensorflow-wavenet/issues/141/comments","events_url":"https://api.github.com/repos/ibab/tensorflow-wavenet/issues/141/events","html_url":"https://github.com/ibab/tensorflow-wavenet/issues/141","id":182167875,"number":141,"title":"Model fails to learn sine wave","user":{"login":"atgambardella","id":1356657,"avatar_url":"https://avatars.githubusercontent.com/u/1356657?v=3","gravatar_id":"","url":"https://api.github.com/users/atgambardella","html_url":"https://github.com/atgambardella","followers_url":"https://api.github.com/users/atgambardella/followers","following_url":"https://api.github.com/users/atgambardella/following{/other_user}","gists_url":"https://api.github.com/users/atgambardella/gists{/gist_id}","starred_url":"https://api.github.com/users/atgambardella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atgambardella/subscriptions","organizations_url":"https://api.github.com/users/atgambardella/orgs","repos_url":"https://api.github.com/users/atgambardella/repos","events_url":"https://api.github.com/users/atgambardella/events{/privacy}","received_events_url":"https://api.github.com/users/atgambardella/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2016-10-11T03:57:21Z","updated_at":"2016-10-18T22:21:39Z","closed_at":null,"body":"With the default parameters (simply cloning the repo and training), the model could not fit a sine wave (I was intentionally trying to overfit on one of the simplest examples as a sanity check).\r\n\r\nThe model seems to converge at a loss of 0.001~0.002. The input and output are here: [https://soundcloud.com/andrew-gambardella-769364795/sets/sine](https://soundcloud.com/andrew-gambardella-769364795/sets/sine)\r\n\r\nNotice that the input sine wave sounds a lot cleaner than the output.\r\n\r\nI think it would be useful to get this working before moving onto more complicated examples such as voice.\r\n\r\nIs this difference because of the quantization? And is it significant enough to affect the real audio samples?"},"comment":{"url":"https://api.github.com/repos/ibab/tensorflow-wavenet/issues/comments/254656662","html_url":"https://github.com/ibab/tensorflow-wavenet/issues/141#issuecomment-254656662","issue_url":"https://api.github.com/repos/ibab/tensorflow-wavenet/issues/141","id":254656662,"user":{"login":"lemonzi","id":3180006,"avatar_url":"https://avatars.githubusercontent.com/u/3180006?v=3","gravatar_id":"","url":"https://api.github.com/users/lemonzi","html_url":"https://github.com/lemonzi","followers_url":"https://api.github.com/users/lemonzi/followers","following_url":"https://api.github.com/users/lemonzi/following{/other_user}","gists_url":"https://api.github.com/users/lemonzi/gists{/gist_id}","starred_url":"https://api.github.com/users/lemonzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemonzi/subscriptions","organizations_url":"https://api.github.com/users/lemonzi/orgs","repos_url":"https://api.github.com/users/lemonzi/repos","events_url":"https://api.github.com/users/lemonzi/events{/privacy}","received_events_url":"https://api.github.com/users/lemonzi/received_events","type":"User","site_admin":false},"created_at":"2016-10-18T22:21:38Z","updated_at":"2016-10-18T22:21:38Z","body":"Audio does get close to the extreme, but not very frequently; the\ndistribution of values is clustered around 0. Actually, most noise models\nassume that this distribution is gaussian and centered at zero. If it goes\nover the extreme there's clipping indeed, although all professional systems\ninclude limiters and compressors that implement a \"softmax\" that makes sure\nthis doesn't happen because of spurious peaks.\n\nAFAIK though these logarithmic compressors like mu-law that work with low\nbit depths are more common in legacy speech-related systems, and nowadays\nmp3 and the like use linearly-encoded PCM followed by an adaptive\nquantization in the frequency domain.\n\nEl dt., 18 oct. 2016 a les 18:09, jyegerlehner (<notifications@github.com>)\nva escriure:\n\n> @atgambardella <https://github.com/atgambardella>\n> TL;DR: If your sine wave has scaling 1.0 to -1.0, then I suggest\n> multiplying its amplitude by 0.2 or so, and re-running your test.\n>\n> *Rationale*\n> The mu-law encoding is inherently low resolution at the extreme ends of\n> its range, and the range is -1 to 1. It can only represent 256 values (with\n> current quantization levels value), and the resolution is concentrated in\n> the middle of the range around zero. If you look at four values it can\n> represent nearest to 1.0, they are: 1.0, 0.957, 0.916, 0.877: those are\n> pretty big step changes between values. By contrast, in the middle near\n> zero we get: -6.44772721e-04 -4.50432097e-04 -2.64362287e-04\n> -8.62116940e-05: much higher resolution.\n>\n> So a sine wave that goes all the way to 1, would necessarily have a step\n> change to 0.957 as it decreases. In the frequency domain this step change\n> will manifest as lots of high frequency energy, (pop or hiss). By staying\n> in a more normal range where the encoding is higher resolution, these\n> quantization step changes are much smaller in magnitude and thus induce\n> less audible noise.\n>\n> I'm not experienced with audio, but I don't think well-produced audio\n> normally gets too close to the extreme of the amplitude range; if it ever\n> goes over, what's that, \"clipping\"?\n>\n> —\n> You are receiving this because you were mentioned.\n>\n>\n> Reply to this email directly, view it on GitHub\n> <https://github.com/ibab/tensorflow-wavenet/issues/141#issuecomment-254654132>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ADCF5ggQUjvwnnjX5gXUhGPkZ3M4bh6iks5q1UOSgaJpZM4KTN74>\n> .\n>\n"}}
{"actor":{"display_login":"lemonzi"}}