Reliable training and estimation of variance networks