Browse Source

!10371 Fix an issue of laplace operator.

From: @jxlang910
Reviewed-by: @zh_qh,@liangchenghui
Signed-off-by: @liangchenghui
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
c1dd6cfa61
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      mindspore/ops/composite/random_ops.py

+ 6
- 1
mindspore/ops/composite/random_ops.py View File

@@ -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)


Loading…
Cancel
Save