diff --git a/src/inference/forward_backward.jl b/src/inference/forward_backward.jl index df7d7aeb..d8777de1 100644 --- a/src/inference/forward_backward.jl +++ b/src/inference/forward_backward.jl @@ -34,12 +34,7 @@ Base.length(fb::ForwardBackwardStorage) = size(fb.α, 1) duration(fb::ForwardBackwardStorage) = size(fb.α, 2) function loglikelihood(fb::ForwardBackwardStorage{R}) where {R} - logL = zero(R) - logL -= sum(log, fb.c) - logL += sum(fb.logm) - # for t in 1:duration(fb) - # logL += -log(fb.c[t]) + fb.logm[t] - # end + logL = -sum(log, fb.c) + sum(fb.logm) return logL end diff --git a/test/runtests.jl b/test/runtests.jl index e67e9398..ad73896f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -17,6 +17,10 @@ using Test @testset verbose = true "Type stability" begin include("type_stability.jl") end + + @testset verbose = true "Allocations" begin + include("allocations.jl") + end end @testset "Interface" begin @@ -31,10 +35,6 @@ using Test include("correctness.jl") end - @testset verbose = true "Allocations" begin - include("allocations.jl") - end - @testset verbose = true "Sparse" begin include("sparse.jl") end diff --git a/test/testitems.jl b/test/testitems.jl index 4fd55348..1a52d381 100644 --- a/test/testitems.jl +++ b/test/testitems.jl @@ -18,6 +18,10 @@ end include("type_stability.jl") end +@testitem "Allocations" begin + include("allocations.jl") +end + @testitem "Interface" begin include("interface.jl") end @@ -30,10 +34,6 @@ end include("correctness.jl") end -@testitem "Allocations" begin - include("allocations.jl") -end - @testitem "Sparse" begin include("sparse.jl") end