評價此頁

torch.Tensor.uniform_#

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

self 張量填充為從連續均勻分佈中取樣的數字。

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