Skip to content

Commit

Permalink
Fix test bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Routhleck committed Nov 22, 2024
1 parent 2a5adea commit dba2438
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion brainpy/_src/math/op_register/ad_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def _standard_jvp(jvp_rules, primitive: Primitive, primals, tangents, **params):
assert tree_util.tree_structure(r) == tree
return val_out, functools.reduce(_add_tangents,
tangents_out,
tree_util.tree_map(lambda a: ad.Zero.from_value(a), val_out))
tree_util.tree_map(lambda a: ad.Zero.from_primal_value(a), val_out))


def _add_tangents(xs, ys):
Expand Down

0 comments on commit dba2438

Please sign in to comment.