From 6100af360fa6cbf1ca372b05714f198926a73bbf Mon Sep 17 00:00:00 2001 From: Lee Newberg Date: Fri, 11 Jun 2021 08:57:34 -0400 Subject: [PATCH] DOC: Add intermediate step to show definition of KL divergence. --- .../Variational_Inference_and_Joint_Distributions.ipynb | 1 + 1 file changed, 1 insertion(+) diff --git a/tensorflow_probability/examples/jupyter_notebooks/Variational_Inference_and_Joint_Distributions.ipynb b/tensorflow_probability/examples/jupyter_notebooks/Variational_Inference_and_Joint_Distributions.ipynb index 7ac1fe1b80..260234865d 100644 --- a/tensorflow_probability/examples/jupyter_notebooks/Variational_Inference_and_Joint_Distributions.ipynb +++ b/tensorflow_probability/examples/jupyter_notebooks/Variational_Inference_and_Joint_Distributions.ipynb @@ -102,6 +102,7 @@ "\u0026\\defeq -\\log \\int \\textrm{d}\\theta\\, r(\\theta) \\prod_i^n p(y_i|x_i,\\theta, \\omega) \u0026\u0026 \\text{(Really hard integral)} \\\\\n", "\u0026= -\\log \\int \\textrm{d}\\theta\\, q(\\theta) \\frac{1}{q(\\theta)} r(\\theta) \\prod_i^n p(y_i|x_i,\\theta, \\omega) \u0026\u0026 \\text{(Multiply by 1)}\\\\\n", "\u0026\\le - \\int \\textrm{d}\\theta\\, q(\\theta) \\log \\frac{r(\\theta) \\prod_i^n p(y_i|x_i,\\theta, \\omega)}{q(\\theta)} \u0026\u0026 \\text{(Jensen's inequality)}\\\\\n", + "\u0026= - \\int \\textrm{d}\\theta\\, q(\\theta) \\sum_i^n \\log p(y_i|x_i,\\theta, \\omega) + \\int \\textrm{d}\\theta\\, q(\\theta) \\log \\frac{q(\\theta)}{r(\\theta)} \u0026\u0026 \\\\\n", "\u0026\\defeq \\E_{q(\\Theta)}[ -\\sum_i^n \\log p(y_i|x_i,\\Theta, \\omega) ] + \\K[q(\\Theta), r(\\Theta)]\\\\\n", "\u0026\\defeq ``\\text{expected negative log likelihood\"} + ``\\text{kl regularizer\"}\n", "\\end{align*}\n",