评价此页

torch.Tensor.uniform_#

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

self 张量填充为从连续均匀分布中采样的数字。

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