Rate this Page

torch.Tensor.uniform_#

Tensor.uniform_(from=0, to=1, *, generator=None) Tensor#

Fills self tensor with numbers sampled from the continuous uniform distribution:

f(x)=1tofromf(x) = \dfrac{1}{\text{to} - \text{from}}