Skip to content

Commit ab6deed

Browse files
committed
to gradient_choices
1 parent 60b2ce3 commit ab6deed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/static_ir/backprop.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ function back_codegen!(stmts, ir, selected_calls, fwd_marked, back_marked,
297297
end
298298
end
299299

300-
# NOTE: the value_choices and choice_gradient are dealt with later
300+
# NOTE: the value_choices and gradient_choices are dealt with later
301301
end
302302

303303
function back_codegen!(stmts, ir, selected_calls, fwd_marked, back_marked,
@@ -327,7 +327,7 @@ end
327327

328328
function generate_value_choice_gradient(selected_choices::Set{RandomChoiceNode},
329329
selected_calls::Set{GenerativeFunctionCallNode},
330-
value_choices::Symbol, choice_gradient::Symbol)
330+
value_choices::Symbol, gradient_choices::Symbol)
331331
selected_choices_vec = collect(selected_choices)
332332
quoted_leaf_keys = map((node) -> QuoteNode(node.addr), selected_choices_vec)
333333
leaf_values = map((node) -> :(trace.$(get_value_fieldname(node))), selected_choices_vec)
@@ -342,7 +342,7 @@ function generate_value_choice_gradient(selected_choices::Set{RandomChoiceNode},
342342
$value_choices = StaticChoiceMap(
343343
NamedTuple{($(quoted_leaf_keys...),)}(($(leaf_values...),)),
344344
NamedTuple{($(quoted_internal_keys...),)}(($(internal_values...),)))
345-
$choice_gradient = StaticChoiceMap(
345+
$gradient_choices = StaticChoiceMap(
346346
NamedTuple{($(quoted_leaf_keys...),)}(($(leaf_gradients...),)),
347347
NamedTuple{($(quoted_internal_keys...),)}(($(internal_gradients...),)))
348348
end

0 commit comments

Comments
 (0)