Exemple #1
0
 def E(self, x):
     return batch_mvn.E(x, self.mu, self.inv_L, self.diag)
Exemple #2
0
 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)
Exemple #3
0
 def E(self, x):
     return batch_mvn.E(x, 0, self._sigma, True)
Exemple #4
0
 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)