Skip to content

Commit

Permalink
Update src/beliefpropagation/beliefpropagation.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 authored Nov 9, 2023
1 parent a5008ee commit db9a474
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/beliefpropagation/beliefpropagation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function belief_propagation(
),
verbose=false,
) where {E<:NamedEdge}
compute_norm = target_precision == nothing ? false : true
compute_norm = !isnothing(target_precision)
for i in 1:niters
mts, c = belief_propagation_iteration(tn, mts, edges; contract_kwargs, compute_norm)
if compute_norm && c <= target_precision
Expand Down

0 comments on commit db9a474

Please sign in to comment.