diff --git a/python/taichi/examples/autodiff/jacobian.py b/python/taichi/examples/autodiff/jacobian.py index dfd479457d6ad..70e6b51b0b9b9 100644 --- a/python/taichi/examples/autodiff/jacobian.py +++ b/python/taichi/examples/autodiff/jacobian.py @@ -15,7 +15,7 @@ def func(): for j in range(N_loss): for i in range(N_param): - losses[j] = ti.sin(j / 16 * np.pi) * ti.sin( + losses[j] += ti.sin(j / 16 * np.pi) * ti.sin( i / 16 * np.pi) * params[i]