用法
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.Beta.quantile用法及代碼示例
- Python tf.compat.v1.distributions.Beta.log_cdf用法及代碼示例
- Python tf.compat.v1.distributions.Beta.covariance用法及代碼示例
- Python tf.compat.v1.distributions.Beta.cdf用法及代碼示例
- Python tf.compat.v1.distributions.Beta.log_survival_function用法及代碼示例
- Python tf.compat.v1.distributions.Beta.stddev用法及代碼示例
- Python tf.compat.v1.distributions.Beta.cross_entropy用法及代碼示例
- Python tf.compat.v1.distributions.Beta.survival_function用法及代碼示例
- Python tf.compat.v1.distributions.Beta.variance用法及代碼示例
- Python tf.compat.v1.distributions.Beta用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.cross_entropy用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.covariance用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.survival_function用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.kl_divergence用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.log_survival_function用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.log_cdf用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.stddev用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.cdf用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.quantile用法及代碼示例
- Python tf.compat.v1.distributions.Bernoulli.variance用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.compat.v1.distributions.Beta.kl_divergence。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
