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

unit1/02_diffusion_models_from_scratch.ipynb typo in formulas #63

Open
mnslarcher opened this issue May 23, 2023 · 0 comments
Open

unit1/02_diffusion_models_from_scratch.ipynb typo in formulas #63

mnslarcher opened this issue May 23, 2023 · 0 comments

Comments

@mnslarcher
Copy link

Hi! I think a typo fixed in notebook 01 wasn't fixed in notebook 02,

q(xt | x0) ~ N(sqrt(1-alpha)*x0, sqrt(1-alpha)*I)

should be

q(xt | x0) ~ N(sqrt(1-alpha)*x0, 1-alpha*I).

For the same reason, instead of

"and add noise scaled by beta_t"

should be

"and add noise scaled by sqrt(beta_t)"

because the noise should be scaled with the std. dev., not the variance.

Or in other terms

q(xt | x0) ~ N(sqrt(1-beta)*x0, beta*I) => q(xt | x0) = sqrt(1-beta) * x0 + sqrt(beta) * e

with e ~ N(0, I),

var(sqrt(1-beta) * x0 + sqrt(beta) * e) = var(sqrt(beta) * e) = beta * var(e) = beta * I.

This second typo is still in notebook 01 too.

Do you think this makes sense?

Sorry if I'm missing something here and thanks for the great course!

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

1 participant