An efficient forward-backward algorithm for an explicit-duration hidden Markov model | Synapse