nvidia.dali.experimental.dynamic.random.beta#
- nvidia.dali.experimental.dynamic.random.beta(shape_like=None, /, *, batch_size=None, device=None, alpha=None, beta=None, dtype=None, seed=None, shape=None, rng=None)#
Generates a random number from
[0, 1]range following the beta distribution.The beta distribution has the following probabilty distribution function:
\[f(x) = \frac{\Gamma(\alpha + \beta)}{\Gamma(\alpha)\Gamma(\beta)} x^{\alpha-1} (1-x)^{\beta-1}\]where
Гis the gamma function defined as:\[\Gamma(\alpha) = \int_0^\infty x^{\alpha-1} e^{-x} \, dx\]The operator supports
float32andfloat64output types.The shape of the generated data can be either specified explicitly with a
shapeargument, or chosen to match the shape of the __shape_like input, if provided. If none are present, a single value per sample is generated.- Supported backends
‘cpu’
- Parameters:
shape_like¶ (Tensor/Batch, optional) – Shape of this input will be used to infer the shape of the output, if provided.
- Keyword Arguments:
alpha¶ (float or Tensor/Batch of float, optional, default = 1.0) – The alpha parameter, a positive
float32scalar.beta¶ (float or Tensor/Batch of float, optional, default = 1.0) – The beta parameter, a positive
float32scalar.dtype¶ (
nvidia.dali.types.DALIDataType, optional) –Output data type.
Note
The generated numbers are converted to the output data type, rounding and clamping if necessary.
shape¶ (int or list of int or Tensor/Batch of int, optional) – Shape of the output data.
rng¶ (RNG, optional) – A random number generator instance. Can be obtained by calling
nvidia.dali.experimental.dynamic.random.RNG(seed)(). If not provided, the default RNG is used.