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

When calculating the exact likelihood, why you do not add uniform noise to the input image? #24

Open
huanranchen opened this issue Nov 24, 2023 · 1 comment

Comments

@huanranchen
Copy link

huanranchen commented Nov 24, 2023

Hi~
According to the definition of bpd
image
We should calculate the likelihood of x+u to approximate the bpd.

However, in this code, it directly calculate the likelihood of x instead of x+u. I test some image, and it even give me negative bpd (which means the probability of generating such image is greater than 1). Is this wrong?

@daihuiao
Copy link

daihuiao commented Jun 5, 2024

Hello, I am also learning the likelihood calculation in score sde. Although I did not understand the formula you attached above, I feel that there is something wrong with the code implementation in the project.

I noticed that in the original code, the prior log probability (prior_logp) is calculated using this line. This formula calculates prior_logp based on the final output of the ODE solver (see line 101: zp = solution.y[:, -1]), which means the prior log probability is computed by inputting the final denoised image into a Gaussian distribution.

However, according to the formula in the paper, the final likelihood should be the likelihood of the Gaussian distribution plus an integral term. Am I misunderstanding something?

Any response would be greatly appreciated.

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

No branches or pull requests

2 participants