d37088fd9a08cc0972a64f5884b0647540309cb9,gpytorch/lazy/inv_quad_lazy_variable.py,InvQuadLazyVariable,diag,#InvQuadLazyVariable#,69
Before Change
def diag(self):
lhs = self.left_mat
rhs = inv_matmul(self.inv_mat, self.right_mat.transpose(-1, -2))
return (lhs * rhs.transpose(-1, -2)).sum(-1)
After Change
def diag(self):
lhs = self.left_mat
rhs = inv_matmul(self.inv_mat, self.right_mat.transpose(-1, -2))
res = (lhs * rhs.transpose(-1, -2)).sum(-1)
res.add_(self.added_diag)
return res
def inv_quad_log_det(self, inv_quad_rhs=None, log_det=False):
if inv_quad_rhs is not None and inv_quad_rhs.ndimension() == 1:
inv_quad_rhs = inv_quad_rhs.unsqueeze(-1)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: cornellius-gp/gpytorch
Commit Name: d37088fd9a08cc0972a64f5884b0647540309cb9
Time: 2018-05-04
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/inv_quad_lazy_variable.py
Class Name: InvQuadLazyVariable
Method Name: diag
Project Name: cornellius-gp/gpytorch
Commit Name: 3cc5d3d7e88d812280ca927a328cef8f1cb6e9a3
Time: 2019-07-16
Author: gardner.jake@gmail.com
File Name: gpytorch/mlls/variational_elbo.py
Class Name: VariationalELBO
Method Name: forward
Project Name: PIQuIL/QuCumber
Commit Name: 088b7601d2a21eb092150ae5f4070a8ab52306f3
Time: 2018-08-18
Author: emerali@users.noreply.github.com
File Name: qucumber/observables/pauli.py
Class Name: SigmaX
Method Name: apply