giagrad.Tensor.uniform#

Tensor.uniform(a=0.0, b=1.0) Tensor[source]#

Fills Tensor data with values drawn from the uniform distribution \(\mathcal{U}(a, b)\).

Parameters:
  • a (float) – The lower bound of the uniform distribution.

  • b (float) – The upper bound of the uniform distribution.

Examples

>>> Tensor.empty(3, 3).uniform()