'Convert the bag of words vector of shape (n_docs, n_vocab)
into latent mean log variance vectors.'

def encode(self, bow):

    lam = F.relu(self.l1(bow))
    pi = F.relu(self.l2(lam))
    (mu, log_sigma) = F.split_axis(self.mu_logsigma(pi), 2, 1)
    sample = F.gaussian(mu, log_sigma)
    loss = F.gaussian_kl_divergence(mu, log_sigma)
    return (sample, loss)
