uniform

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

Return a tensor initialized from the uniform distribution.

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

dragon.Tensor The output tensor.