uniform

dragon.vm.tensorflow.random.uniform(
  shape,
  minval=0,
  maxval=1,
  dtype='float32',
  seed=None,
  name=None
)

Return a tensor initialized from the uniform distribution.

The Uniform distribution is defined as:

\[X \sim U(\alpha, \beta) \]
Parameters:
  • shape (Sequence[Union[int, dragon.Tensor]]) – The shape of the tensor.
  • minval (number, optional, default=0) – The value of \(\alpha\).
  • maxval (number, optional, default=1) – The value of \(\beta\).
  • dtype (str, optional) – The optional data type.
  • seed (int, optional) – The optional random seed.
  • name (str, optional) – A optional name for the operation.
Returns:

dragon.Tensor – The output tensor.