From 5cf472cd39ac32d74547c9470ec67495e8924054 Mon Sep 17 00:00:00 2001 From: peixu_ren Date: Tue, 25 Aug 2020 11:15:48 -0400 Subject: [PATCH] Add note of limitation for prarmeters of uniform --- mindspore/nn/probability/README.md | 2 +- mindspore/ops/composite/random_ops.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mindspore/nn/probability/README.md b/mindspore/nn/probability/README.md index 14063751d4..82f37c2ea9 100644 --- a/mindspore/nn/probability/README.md +++ b/mindspore/nn/probability/README.md @@ -32,7 +32,7 @@ The objective of MDP is to integrate deep learning with Bayesian learning. On th - Context: context managers for models and layers. **Layer 3: Toolbox provides a set of BNN tools for some specific applications** -- Uncertainty Estimation([mindspore.nn.probability.toolbox.uncertainty_evaluate](https://gitee.com/mindspore/mindspore/tree/master/mindspore/nn/probability/toolbox/uncertainty_evaluate.py)): Interfaces to estimate epistemic uncertainty and aleatoric uncertainty. +- Uncertainty Estimation([mindspore.nn.probability.toolbox.uncertainty_evaluation](https://gitee.com/mindspore/mindspore/tree/master/mindspore/nn/probability/toolbox/uncertainty_evaluation.py)): Interfaces to estimate epistemic uncertainty and aleatoric uncertainty. - OoD detection: Interfaces to detect out of distribution samples. ![Structure of MDP](https://images.gitee.com/uploads/images/2020/0820/115117_2a20da64_7825995.png "MDP.png") diff --git a/mindspore/ops/composite/random_ops.py b/mindspore/ops/composite/random_ops.py index c1d0bf52c9..d4a8bcba22 100644 --- a/mindspore/ops/composite/random_ops.py +++ b/mindspore/ops/composite/random_ops.py @@ -96,6 +96,9 @@ def uniform(shape, a, b, seed=0, dtype=mstype.float32): """ Generates random numbers according to the Uniform random number distribution. + Note: + The number in tensor a should be strictly less than b at any position after broadcasting. + Args: shape (tuple): The shape of random tensor to be generated. a (Tensor): The a distribution parameter.