def _compute_non_batch_kl(mu_a, sigma_a, mu_b, sigma_b):
<EOL>sigma_b_inv = np.linalg.inv(sigma_b)<EOL>t = np.trace(sigma_b_inv.dot(sigma_a))<EOL>q = (mu_b - mu_a).dot(sigma_b_inv).dot(mu_b - mu_a)<EOL>k = mu_a.shape[<NUM_LIT:0>]<EOL>l = np.log(np.linalg.det(sigma_b) / np.linalg.det(sigma_a))<EOL>return <NUM_LIT:0.5> * (t + q - k + l)<EOL>
Non-batch KL for N(mu_a, sigma_a), N(mu_b, sigma_b).