91b0d220c8e816766fd4565e1d2f5115d3afbefe,test/functions/test_inv_quad_log_det.py,TestInvQuadLogDetBatch,test_inv_quad_log_det_many_vectors,#TestInvQuadLogDetBatch#,130
Before Change
.sum(2)
.sum(1)
)
actual_log_det = torch.cat(
[self.mats_var_clone[0].det().log().unsqueeze(0), self.mats_var_clone[1].det().log().unsqueeze(0)]
)
with gpytorch.settings.num_trace_samples(1000):
nlv = NonLazyTensor(self.mats_var)
res_inv_quad, res_log_det = nlv.inv_quad_log_det(inv_quad_rhs=self.vecs_var, log_det=True)
self.assertTrue(approx_equal(res_inv_quad, actual_inv_quad, epsilon=1e-1))
After Change
def test_inv_quad_log_det_many_vectors(self):
// Forward pass
actual_inv_quad = (
torch.cat([mat.inverse().unsqueeze(0) for mat in self.mats_clone])
.matmul(self.vecs_clone)
.mul(self.vecs_clone)
.sum(2)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: cornellius-gp/gpytorch
Commit Name: 91b0d220c8e816766fd4565e1d2f5115d3afbefe
Time: 2018-10-12
Author: gpleiss@gmail.com
File Name: test/functions/test_inv_quad_log_det.py
Class Name: TestInvQuadLogDetBatch
Method Name: test_inv_quad_log_det_many_vectors
Project Name: cornellius-gp/gpytorch
Commit Name: 91b0d220c8e816766fd4565e1d2f5115d3afbefe
Time: 2018-10-12
Author: gpleiss@gmail.com
File Name: test/functions/test_inv_quad_log_det.py
Class Name: TestInvQuadLogDetBatch
Method Name: test_log_det_only
Project Name: pymc-devs/pymc3
Commit Name: d15d9ad19021a8a3f26a86fbc6b71838ac37e7d1
Time: 2017-03-30
Author: jonathan.h.friedman@gmail.com
File Name: pymc3/distributions/multivariate.py
Class Name: MvNormal
Method Name: logp