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

Redundancy of jnp.where operation in d3pm p_logits. #1999

Open
cloneofsimo opened this issue Apr 10, 2024 · 0 comments
Open

Redundancy of jnp.where operation in d3pm p_logits. #1999

cloneofsimo opened this issue Apr 10, 2024 · 0 comments

Comments

@cloneofsimo
Copy link

model_logits = jnp.where(t_broadcast == 0,
pred_x_start_logits,
self.q_posterior_logits(pred_x_start_logits, x,
t, x_start_logits=True)
)

Here, we can see that p_logit function is returning logit of prediction of x_0 if t == 0, otherwise q_posterior. which is understandable,

However, looking at the q_posterior_logits method, we can see that it is already returning x_start if t is 0.

return jnp.where(t_broadcast == 0, tzero_logits,
out)

So I think we don't need this LOC, am I missing something?

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

No branches or pull requests

1 participant