def E(self, x): return batch_mvn.E(x, self.mu, self.inv_L, self.diag)
def E(self, x): y = -x.clone() y[:, 1] = x[:, 1] + 0.5 * x[:, 0]**2 + 1 return batch_mvn.E(y, self.mu, self.inv_L, self.diag)
def E(self, x): return batch_mvn.E(x, 0, self._sigma, True)
def E(self, x): vec = torch.zeros((x.size(0), self.K), device=self.L.device) for k in range(self.K): vec[:, k] = -batch_mvn.E(x, self.mu[k].unsqueeze(0), self.inv_L[k]) return -torch.logsumexp(vec, dim=1)