From 0092f8e30971b6c1ea01925fdb68a34fcff356cf Mon Sep 17 00:00:00 2001 From: Aziz Zayed Date: Tue, 15 Jun 2021 08:22:51 -0700 Subject: [PATCH] Fixed truncated-normal bug --- api/src/main/java/ai/djl/ndarray/BaseNDManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/ai/djl/ndarray/BaseNDManager.java b/api/src/main/java/ai/djl/ndarray/BaseNDManager.java index 0ca4e5c2146..8012cecb05c 100644 --- a/api/src/main/java/ai/djl/ndarray/BaseNDManager.java +++ b/api/src/main/java/ai/djl/ndarray/BaseNDManager.java @@ -169,7 +169,7 @@ public NDArray truncatedNormal(float loc, float scale, Shape shape, DataType dat dist[i] = sample; } - return create(dist).addi(loc).muli(scale).reshape(shape).toType(dataType, false); + return create(dist).muli(scale).addi(loc).reshape(shape).toType(dataType, false); } /** {@inheritDoc} */