評價此頁

torch.Tensor.log_normal_#

Tensor.log_normal_(mean=1, std=2, *, generator=None)#

使用給定的均值 μ\mu 和標準差 σ\sigma 引數化的對數正態分佈中的數字填充 self 張量。請注意,meanstd 是底層正態分佈的均值和標準差,而不是返回分佈的均值和標準差。

f(x)=1xσ2π e(lnxμ)22σ2f(x) = \dfrac{1}{x \sigma \sqrt{2\pi}}\ e^{-\frac{(\ln x - \mu)^2}{2\sigma^2}}