用法
kl_divergence(
    other, name='kl_divergence'
)參數
- 
othertfp.distributions.Distribution實例。
- 
namePythonstr附加在此函數創建的操作名稱之前。
返回
- 
kl_divergenceself.dtypeTensor與形狀[B1, ..., Bn]表示n對 Kullback-Leibler 散度的不同計算。
計算 Kullback-Leibler 散度。
用 p 表示此分布 (self),用 q 表示 other 分布。假設 p, q 相對於參考測量 r 絕對連續,則 KL 散度定義為:
KL[p, q] = E_p[log(p(X)/q(X))]
         = -int_F p(x) log q(x) dr(x) + int_F p(x) log p(x) dr(x)
         = H[p, q] - H[p]其中F表示隨機變量的支持度X ~ p ,  H[., .]表示(Shanon)交叉熵,H[.]表示(Shanon)熵。
相關用法
- Python tf.compat.v1.distributions.Gamma.cdf用法及代碼示例
- Python tf.compat.v1.distributions.Gamma.log_cdf用法及代碼示例
- Python tf.compat.v1.distributions.Gamma.cross_entropy用法及代碼示例
- Python tf.compat.v1.distributions.Gamma.stddev用法及代碼示例
- Python tf.compat.v1.distributions.Gamma.covariance用法及代碼示例
- Python tf.compat.v1.distributions.Gamma.quantile用法及代碼示例
- Python tf.compat.v1.distributions.Gamma.log_survival_function用法及代碼示例
- Python tf.compat.v1.distributions.Gamma.variance用法及代碼示例
- Python tf.compat.v1.distributions.Gamma.survival_function用法及代碼示例
- Python tf.compat.v1.distributions.Gamma用法及代碼示例
- Python tf.compat.v1.distributions.Multinomial.stddev用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.cross_entropy用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.covariance用法及代碼示例
- Python tf.compat.v1.distributions.Normal.log_survival_function用法及代碼示例
- Python tf.compat.v1.distributions.Laplace.stddev用法及代碼示例
- Python tf.compat.v1.distributions.Multinomial.quantile用法及代碼示例
- Python tf.compat.v1.distributions.Uniform.log_survival_function用法及代碼示例
- Python tf.compat.v1.distributions.Normal.log_cdf用法及代碼示例
- Python tf.compat.v1.distributions.Laplace.cross_entropy用法及代碼示例
- Python tf.compat.v1.distributions.Dirichlet.covariance用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.compat.v1.distributions.Gamma.kl_divergence。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
