-
Notifications
You must be signed in to change notification settings - Fork 140
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
Bad amplitude normalization #24
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
Every batch, the amplitudes are min-max normalized to the batch.
This is bad for three reasons:
First reason: DC offset. The normalization is calculated by subtracting the minimum and dividing by the maximum. If minimum peak and maximum peak are different, silence is no longer the middle value, so you introduce a DC offset into the audio.
Second reason: Each batch has different peaks, so each batch will have a different quantization value for silence.
Third reason: dynamics. let's say part of my dataset is soft, part is loud, and part is transitions between soft and loud. If randomly there's a batch of all soft sounds, they will be normalized to loud, interfering with SampleRNN's ability to learn transitions from loud and soft.
Solution
Dont batch normalize amplitudes.
Take this line out
sampleRNN_ICLR2017/datasets/dataset.py
Line 127 in d1d77d7
I think the only acceptable amplitude normalization would be to the entire dataset and you could do so [with ffmpeg] when creating the dataset.
The text was updated successfully, but these errors were encountered: