\begin{align}
    - \mathcal{L} \left(\boldsymbol\theta, \boldsymbol\phi; \boldsymbol{x^{(i)}} \right) = & D_{KL} \left( q_{\boldsymbol\phi} \left( \boldsymbol{z}|\boldsymbol{x^{(i)}} || p_{\boldsymbol\theta} \left( \boldsymbol{z} \right)\right) \right) \nonumber \\
    & - \mathbb{E}_{q_{\boldsymbol\phi} \left( \boldsymbol{z}|\boldsymbol{x^{(i)}} \right)} \left[ \log{p_\theta \left( \boldsymbol{x^{(i)}} | \boldsymbol{z} \right)} \right] \nonumber \\
    & = \mathcal{L}_{{KL}}^{(i)} + \mathcal{L}_{{Recon}}^{(i)}
\label{eq:loss}
\end{align}
