Skip to content

Commit d5d5333

Browse files
committed
to gradient_choices
1 parent ab6deed commit d5d5333

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/static_ir/backprop.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,18 +429,18 @@ function codegen_choice_gradients(trace_type::Type{T}, selection_type::Type,
429429
back_codegen!(stmts, ir, selected_calls, fwd_marked, back_marked, node, BackpropTraceMode())
430430
end
431431

432-
# assemble value_choices and choice_gradient
432+
# assemble value_choices and gradient_choices
433433
value_choices = gensym("value_choices")
434-
choice_gradient = gensym("choice_gradient")
434+
gradient_choices = gensym("gradient_choices")
435435
push!(stmts, generate_value_choice_gradient(selected_choices, selected_calls,
436-
value_choices, choice_gradient))
436+
value_choices, gradient_choices))
437437

438438
# gradients with respect to inputs
439439
arg_grad = (node::ArgumentNode) -> node.compute_grad ? gradient_var(node) : :(nothing)
440440
input_grads = Expr(:tuple, map(arg_grad, ir.arg_nodes)...)
441441

442442
# return values
443-
push!(stmts, :(return ($input_grads, $value_choices, $choice_gradient)))
443+
push!(stmts, :(return ($input_grads, $value_choices, $gradient_choices)))
444444

445445
Expr(:block, stmts...)
446446
end

0 commit comments

Comments
 (0)