From 7f7d12394ea2e36f52ad47f20182740a97c76f0b Mon Sep 17 00:00:00 2001 From: GiggleLiu Date: Sun, 23 Aug 2020 21:56:13 -0400 Subject: [PATCH] check share read and write --- src/stdlib/statistics.jl | 2 +- test/autodiff/hessian_backback.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stdlib/statistics.jl b/src/stdlib/statistics.jl index 70cb42a..069b484 100644 --- a/src/stdlib/statistics.jl +++ b/src/stdlib/statistics.jl @@ -39,7 +39,7 @@ get the pdf of `Normal(μ, σ)` at point `x`. anc1 += x anc1 -= μ anc2 += anc1 / σ # (x- μ)/σ - anc3 += anc2 * anc2 # (x-μ)^2/σ^2 + anc3 += anc2^2 # (x-μ)^2/σ^2 end out -= anc3 * 0.5 # -(x-μ)^2/2σ^2 diff --git a/test/autodiff/hessian_backback.jl b/test/autodiff/hessian_backback.jl index bc4290f..c7f998c 100644 --- a/test/autodiff/hessian_backback.jl +++ b/test/autodiff/hessian_backback.jl @@ -11,7 +11,7 @@ using NiLang.AD: hessian_numeric a += b^d c += b/d ROT(a, c, d) - b += d * d + b += d ^ 2 a += c * d end h1 = hessian_backback(test, (0.0, 2.0, 1.0, 3.0); iloss=1)