@@ -186,13 +186,13 @@ function scalar_rrule_expr(__source__, f, call, setup_stmts, inputs, partials)
186
186
Δs = _propagator_inputs (n_outputs)
187
187
188
188
# Make a projector for each argument
189
- ps, setup_ps = _make_projectors (call. args[2 : end ])
190
- append! (setup_stmts, setup_ps )
189
+ projs, psetup = _make_projectors (call. args[2 : end ])
190
+ append! (setup_stmts, psetup )
191
191
192
192
# 1 partial derivative per input
193
193
pullback_returns = map (1 : n_inputs) do input_i
194
194
∂s = [partial. args[input_i] for partial in partials]
195
- propagation_expr (Δs, ∂s, true , ps [input_i])
195
+ propagation_expr (Δs, ∂s, true , projs [input_i])
196
196
end
197
197
198
198
# Multi-output functions have pullbacks with a tuple input that will be destructured
@@ -221,9 +221,9 @@ _propagator_inputs(n) = [esc(gensym(Symbol(:Δ, i))) for i in 1:n]
221
221
222
222
" given the variable names, escaped but without types, makes setup expressions for projection operators"
223
223
function _make_projectors (xs)
224
- ps = map (x -> gensym (Symbol (:proj_ , x. args[1 ])), xs)
225
- setups = map ((x,p) -> :($ p = ProjectTo ($ x)), xs, ps )
226
- return ps , setups
224
+ projs = map (x -> gensym (Symbol (:proj_ , x. args[1 ])), xs)
225
+ setups = map ((x,p) -> :($ p = ProjectTo ($ x)), xs, projs )
226
+ return projs , setups
227
227
end
228
228
229
229
"""
0 commit comments