Skip to content

Commit

Permalink
modify eval
Browse files Browse the repository at this point in the history
  • Loading branch information
peter0627ustc committed Jan 22, 2024
1 parent d7e2846 commit b7018d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/computational_graph/eval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function eval!(g::Graph{F,W}, leafmap::Dict{Int,Int}=Dict{Int,Int}(), leaf::Vect
for node in PostOrderDFS(g)
if isleaf(node)
if isempty(leafmap)
node.weight = -3.0
node.weight = 1.0
else
node.weight = leaf[leafmap[node.id]]
end
Expand Down

0 comments on commit b7018d7

Please sign in to comment.