tf.distributions.ノーマルの使い方
719 ワード
ソース:https://tensorflow.google.cn/api_docs/python/tf/distributions/Normal
The Normal distribution with location
この関数は正規分布を定義します.
Mathematical details
The probability density function (pdf) is,
where
例えば、tf.distributions.Normal(loc=0,scale=1)#これは標準正規分布
The Normal distribution with location
loc
and scale
parameters. この関数は正規分布を定義します.
Mathematical details
The probability density function (pdf) is,
pdf(x; mu, sigma) = exp(-0.5 (x - mu)**2 / sigma**2) / Z
Z = (2 pi sigma**2)**0.5
where
loc = mu
is the mean, scale = sigma
is the std. deviation, and, Z
is the normalization constant. __init__(
loc,
scale,
validate_args=False,
allow_nan_stats=True,
name='Normal'
)
例えば、tf.distributions.Normal(loc=0,scale=1)#これは標準正規分布