From dba243807313ae1408cfebc3ddfccd7b4abbb1c4 Mon Sep 17 00:00:00 2001 From: He Sichao <1310722434@qq.com> Date: Fri, 22 Nov 2024 17:31:00 +0800 Subject: [PATCH] Fix test bug --- brainpy/_src/math/op_register/ad_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brainpy/_src/math/op_register/ad_support.py b/brainpy/_src/math/op_register/ad_support.py index 342093ea2..15c075707 100644 --- a/brainpy/_src/math/op_register/ad_support.py +++ b/brainpy/_src/math/op_register/ad_support.py @@ -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):