From 8ff2ec81759cacd3352963c62742e05b7131fd32 Mon Sep 17 00:00:00 2001 From: jin-xiulang Date: Wed, 23 Dec 2020 10:38:11 +0800 Subject: [PATCH] Fix an issue of laplace operator. --- mindspore/ops/composite/random_ops.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mindspore/ops/composite/random_ops.py b/mindspore/ops/composite/random_ops.py index 2d0ec2b0b4..65465c48f2 100644 --- a/mindspore/ops/composite/random_ops.py +++ b/mindspore/ops/composite/random_ops.py @@ -92,10 +92,15 @@ def laplace(shape, mean, lambda_param, seed=None): ``Ascend`` ``GPU`` ``CPU`` Examples: - >>> shape = (4, 16) + >>> from mindspore import Tensor + >>> from mindspore.ops import composite as C + >>> import mindspore.common.dtype as mstype + >>> shape = (2, 3) >>> mean = Tensor(1.0, mstype.float32) >>> lambda_param = Tensor(1.0, mstype.float32) >>> output = C.laplace(shape, mean, lambda_param, seed=5) + >>> print(output.shape) + (2, 3) """ mean_dtype = F.dtype(mean) lambda_param_dtype = F.dtype(lambda_param)