Skip to content

Commit

Permalink
Reactivate multithreaded BW (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle authored Nov 11, 2023
1 parent fffad07 commit 7994cbb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion ext/HiddenMarkovModelsChainRulesCoreExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ end
function ChainRulesCore.rrule(
rc::RuleConfig, ::typeof(logdensityof), hmm::AbstractHMM, obs_seq::Vector
)
@info "Chain rule used"
(p, A, logB), pullback = rrule_via_ad(rc, _params_and_loglikelihoods, hmm, obs_seq)
storage = HMMs.initialize_forward_backward(hmm, obs_seq)
HMMs.forward_backward!(storage, hmm, obs_seq)
Expand Down
2 changes: 1 addition & 1 deletion src/inference/baum_welch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function baum_welch!(
loglikelihood_increasing::Bool,
)
for _ in 1:max_iterations
for k in eachindex(obs_seqs, fb_storages)
@threads for k in eachindex(obs_seqs, fb_storages)
forward_backward!(fb_storages[k], hmm, obs_seqs[k])
end
update_sufficient_statistics!(bw_storage, fb_storages)
Expand Down

0 comments on commit 7994cbb

Please sign in to comment.