Skip to content

Commit

Permalink
fix: these indices were backwards
Browse files Browse the repository at this point in the history
  • Loading branch information
denehoffman committed Oct 28, 2024
1 parent c25eb85 commit b14a962
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/likelihoods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,8 @@ impl Function<Float, (), Infallible> for LikelihoodEvaluator {
.zip(self.likelihood_manager.param_layouts.iter())
{
let term_gradient = term.evaluate_gradient(param_buffer); // This has a local layout
for (buffer_idx, &param_idx) in layout.iter().enumerate() {
gradient_buffer[buffer_idx] = term_gradient[param_idx] // This has a global layout
for (term_idx, &buffer_idx) in layout.iter().enumerate() {
gradient_buffer[buffer_idx] = term_gradient[term_idx] // This has a global layout
}
}
let likelihood_gradients = LikelihoodGradients(gradient_buffers);
Expand Down

0 comments on commit b14a962

Please sign in to comment.