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

Code-Paper Mismatch #15

Open
andylolu2 opened this issue Nov 20, 2023 · 0 comments
Open

Code-Paper Mismatch #15

andylolu2 opened this issue Nov 20, 2023 · 0 comments

Comments

@andylolu2
Copy link

Equation 6 & 7 from the paper suggests that the scores are computed from $\hat{x}_{t_i}$ (not $\hat{x}'_{t_i}$).

image

However, in the implementation, the update (Eq. 6) is applied to x then passed to update_fn, which will then compute the scores from the updated x ($\hat{x}'_{t_i}$ in the paper), instead of $\hat{x}_{t_i}$.

def inpaint_update_fn(rng, state, x, t, mask, known, coeff):
x_space = to_space(x)
mean, std = sde.marginal_prob(known, t)
rng, step_rng = jax.random.split(rng)
noise = jax.random.normal(step_rng, x.shape)
noise_space = to_space(noise)
noisy_known = mean + batch_mul(std, noise_space)
x_space = merge_known_with_mask(config, x_space, noisy_known, mask, coeff)
x = from_space(x_space)
rng, step_rng = jax.random.split(rng)
x, x_mean = update_fn(step_rng, state, x, t)
return x

Is there any reason to prefer one method over the other?

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