Skip to content

Commit

Permalink
Fixed truncated-normal bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AzizZayed committed Jun 15, 2021
1 parent a6ded8c commit 0092f8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/src/main/java/ai/djl/ndarray/BaseNDManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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} */
Expand Down

0 comments on commit 0092f8e

Please sign in to comment.