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