85e8cf0742048b55a20418441e4e9e51444c3f54,gpytorch/likelihoods/multitask_gaussian_likelihood.py,_MultitaskGaussianLikelihoodBase,_eval_corr_matrix,#_MultitaskGaussianLikelihoodBase#,76
Before Change
def _eval_corr_matrix(self):
corr_factor = self.task_noise_corr_factor.squeeze(0)
corr_diag = self.task_noise_corr_diag.squeeze(0)
M = corr_factor.matmul(corr_factor.transpose(-1, -2))
idx = torch.arange(M.shape[-1], dtype=torch.long, device=M.device)
M[..., idx, idx] += corr_diag
sem_inv = 1 / torch.diagonal(M, dim1=-2, dim2=-1).sqrt().unsqueeze(-1)
After Change
def _eval_corr_matrix(self):
tnc = self.task_noise_corr
fac_diag = torch.ones(*tnc.shape[:-1], self.num_tasks, device=tnc.device, dtype=tnc.dtype)
Cfac = torch.diag_embed(fac_diag)
Cfac[..., self.tidcs[0], self.tidcs[1]] = self.task_noise_corr
// squared rows must sum to one for this to be a correlation matrix
C = Cfac / Cfac.pow(2).sum(dim=-1, keepdim=True).sqrt()
return C @ C.transpose(-1, -2)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: cornellius-gp/gpytorch
Commit Name: 85e8cf0742048b55a20418441e4e9e51444c3f54
Time: 2019-10-25
Author: balandat@fb.com
File Name: gpytorch/likelihoods/multitask_gaussian_likelihood.py
Class Name: _MultitaskGaussianLikelihoodBase
Method Name: _eval_corr_matrix
Project Name: arraiy/torchgeometry
Commit Name: 50839f8ed95147c71f9f045495ed45380a2ce513
Time: 2019-11-19
Author: priba@cvc.uab.cat
File Name: test/color/test_hls.py
Class Name: TestRgbToHls
Method Name: test_nan_rgb_to_hls
Project Name: epfl-lts2/pygsp
Commit Name: a47a4855d8575acdd8d20e04b95571210cad243f
Time: 2014-12-10
Author: nicolas.rod@epfl.ch
File Name: pygsp/graphs.py
Class Name: Airfoil
Method Name: __init__