Browse Source

Fix an issue of laplace operator.

tags/v1.1.0
jin-xiulang 5 years ago
parent
commit
8ff2ec8175
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