Skip to content
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

predict_start_from_noise #14

Closed
Liujingxiu23 opened this issue Nov 13, 2020 · 2 comments
Closed

predict_start_from_noise #14

Liujingxiu23 opened this issue Nov 13, 2020 · 2 comments
Labels
question Further information is requested

Comments

@Liujingxiu23
Copy link

I do not understand this funcition in the script "diffusion_process.py". Could someone help me?

Frankly speaking,I do not fully understand the process of diffusion and the inverse process.
But for other functions, I can find corresponding equation in the paper "wavegrad" or "Denoising Diffusion Probabilistic Models". But for this function, I cannot.

And the inverse process that generate a wave seems much differ and complex than the process in
https://github.com/lmnt-com/wavegrad/blob/master/src/wavegrad/inference.py. lines 56~64.
Why is there such a difference?

@enhuiz
Copy link

enhuiz commented Nov 13, 2020

Hi @Liujingxiu23 , the code seems to first calculate y_0:

y_recon = self.predict_start_from_noise(y, t, eps_recon)

and based on y_0, it calculates the mean and variance of q(y_{t-1} | y_t, y_0).

model_mean, posterior_log_variance = self.q_posterior(y_start=y_recon, y=y, t=t)

You can try to do the derivation, except for the clip_denoised, it should be identical to

https://github.com/lmnt-com/wavegrad/blob/master/src/wavegrad/inference.py. lines 56~64.

@ivanvovk ivanvovk added the question Further information is requested label Nov 13, 2020
@ivanvovk
Copy link
Owner

ivanvovk commented Nov 20, 2020

The answer on your question has been given. If you have another questions, feel free to reopen issue or open another one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants