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

use a swich condition for belief propagation #85

Closed
LegrandNico opened this issue Sep 1, 2023 · 1 comment
Closed

use a swich condition for belief propagation #85

LegrandNico opened this issue Sep 1, 2023 · 1 comment

Comments

@LegrandNico
Copy link
Collaborator

The belief propagation function consists of a for loop, which might be sub-optimal when caching the function. It could instead be coded as a switch node where relevant update functions are indexed.

@LegrandNico LegrandNico added update functions Belief propagation functions performances labels Sep 1, 2023
@LegrandNico
Copy link
Collaborator Author

Because jax.lax.switch turns everything into Tracers, the node_idx cannot be set as static anymore and this would require using Partial beforehand. I am not sure there is any benefit to doing this in the current codebase, but this is worth trying in the vectorized version, where node_idx can be a tracer (see #124 ).

@LegrandNico LegrandNico added networks and removed update functions Belief propagation functions labels Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant