forked from mindspore-Ecosystem/mindspore
Restrict the range of the parameters in random ops
This commit is contained in:
parent
a92e444f21
commit
54d38e4d13
|
@ -49,7 +49,8 @@ def normal(shape, mean, stddev, seed=0):
|
|||
shape (tuple): The shape of random tensor to be generated.
|
||||
mean (Tensor): The mean μ distribution parameter, which specifies the location of the peak.
|
||||
With float32 data type.
|
||||
stddev (Tensor): The deviation σ distribution parameter. With float32 data type.
|
||||
stddev (Tensor): The deviation σ distribution parameter. It should be greater than 0.
|
||||
With float32 data type.
|
||||
seed (int): Seed is used as entropy source for Random number engines generating pseudo-random numbers.
|
||||
Must be non-negative. Default: 0.
|
||||
|
||||
|
@ -136,8 +137,8 @@ def gamma(shape, alpha, beta, seed=0):
|
|||
|
||||
Args:
|
||||
shape (tuple): The shape of random tensor to be generated.
|
||||
alpha (Tensor): The alpha α distribution parameter. With float32 data type.
|
||||
beta (Tensor): The beta β distribution parameter. With float32 data type.
|
||||
alpha (Tensor): The alpha α distribution parameter. It should be greater than 0. With float32 data type.
|
||||
beta (Tensor): The beta β distribution parameter. It should be greater than 0. With float32 data type.
|
||||
seed (int): Seed is used as entropy source for Random number engines generating pseudo-random numbers.
|
||||
Must be non-negative. Default: 0.
|
||||
|
||||
|
@ -164,7 +165,7 @@ def poisson(shape, mean, seed=0):
|
|||
|
||||
Args:
|
||||
shape (tuple): The shape of random tensor to be generated.
|
||||
mean (Tensor): The mean μ distribution parameter. With float32 data type.
|
||||
mean (Tensor): The mean μ distribution parameter. It should be greater than 0. With float32 data type.
|
||||
seed (int): Seed is used as entropy source for Random number engines generating pseudo-random numbers.
|
||||
Must be non-negative. Default: 0.
|
||||
|
||||
|
|
|
@ -130,9 +130,9 @@ class Gamma(PrimitiveWithInfer):
|
|||
|
||||
Inputs:
|
||||
- **shape** (tuple) - The shape of random tensor to be generated. Only constant value is allowed.
|
||||
- **alpha** (Tensor) - The α distribution parameter.
|
||||
- **alpha** (Tensor) - The α distribution parameter. It should be greater than 0.
|
||||
It is also known as the shape parameter with float32 data type.
|
||||
- **beta** (Tensor) - The β distribution parameter.
|
||||
- **beta** (Tensor) - The β distribution parameter. It should be greater than 0.
|
||||
It is also known as the scale parameter with float32 data type.
|
||||
|
||||
Outputs:
|
||||
|
@ -185,8 +185,8 @@ class Poisson(PrimitiveWithInfer):
|
|||
|
||||
Inputs:
|
||||
- **shape** (tuple) - The shape of random tensor to be generated. Only constant value is allowed.
|
||||
- **mean** (Tensor) - μ, parameter which the distribution was constructed with.
|
||||
The parameter defines the mean number of occurrences of the event, with float32 data type.
|
||||
- **mean** (Tensor) - μ parameter the distribution was constructed with. The parameter defines mean number
|
||||
of occurrences of the event. It should be greater than 0. With float32 data type.
|
||||
|
||||
Outputs:
|
||||
Tensor. Its shape should be the broadcasted shape of `shape` and the shape of `mean`.
|
||||
|
|
Loading…
Reference in New Issue