Skip to content

Commit

Permalink
save elba every 2nd iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
LaraFuhrmann committed Nov 25, 2024
1 parent 3286287 commit 0d9481d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion viloca/local_haplotype_inference/learn_error_params/cavi.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ def run_cavi(
state_init_dict,
state_curr_dict,
)

if iter % 2 == 0:
history_elbo.append(elbo)
if iter % (min_number_iterations-1) == 0:
history_elbo.append(elbo)
history_mean_log_pi.append(state_curr_dict["mean_log_pi"])
Expand Down
2 changes: 2 additions & 0 deletions viloca/local_haplotype_inference/use_quality_scores/cavi.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ def run_cavi(
state_curr_dict,
)

if iter % 2 == 0:
history_elbo.append(elbo)
if iter % (min_number_iterations-1) == 0:
history_elbo.append(elbo)
history_mean_log_pi.append(state_curr_dict["mean_log_pi"])
Expand Down

0 comments on commit 0d9481d

Please sign in to comment.