We work with z in the same way as with other weights W : we use a log-uniform prior and approximate the posterior with a fully-factorized normal distribution with trainable mean and variance.
since z is a one-dimensional vector, we can sample it individually for each object in a mini-batch to reduce the variance of the gradients.