def encode(self, x): h1 = F.tanh(self.le1(x)) mu = self.le2_mu(h1) ln_var = self.le2_ln_var(h1) # log(sigma**2) return mu, ln_var