# Why in Variational Auto Encoder (Gaussian variational family) we model $\log\sigma^2$ and not $\sigma^2$ (or $\sigma$) itself?

In theory the encoder in VAE (assuming that variational family is Gaussian) generates the $\mu$ and $\sigma$ (or $\sigma^2$). But, in practice, I have seen people assuming the output is $\log\sigma^2$. Why this is necessary or useful?

• Thanks - no I wasn't confusing the two. I was just wondering what is to be gained by modelling the $log$. Your answer makes it clear :)! – user3639557 Jun 26 '18 at 10:04