The loss computation can be numerically unstable if elements of the diagonal covariances are very small, due to the term log(d f r + d g r ) and 1 d q +d p .
we add a small constant = 10 −4 so that d f r + d g r and d q + d p becomes d f r + d g r + and d q + d p + .