xiph / LPCNet

Efficient neural speech synthesis
BSD 3-Clause "New" or "Revised" License
1.14k stars 295 forks source link

How to understand the tree_to_pdf and sample_mdense function? #177

Open GodenYQ opened 2 years ago

GodenYQ commented 2 years ago

Hi all, I find there are several important modifications to accelerate the MDense/softmax computation at the commit "d24f49e346b85b5cb2c89c6dadcc913ce004fe83". In the lpcnet.py, the tree_to_pdf function was added. In the nnet.c, the sample_mdense function was added. Author mentioned that these modifications can reduce the MDense/softmax computation from 256 to 8 values. I do not understand the theory of the tree_to_pdf and sample_mdense, can anyone give me some suggestions or references?

Best regards.

jmvalin commented 2 years ago

Sorry for the delay in responding to this, but I thought it was best to answer with our ICASSP 2022 paper which we just put on arxiv: https://arxiv.org/pdf/2202.11169.pdf You'll find the explanation in section 3.1. The tree_to_pdf function is used in training to convert the hierarchical output into "regular" pdf that can be used in the loss function.