Added code-src-note
This commit is contained in:
parent
ab1b269af9
commit
2626ec82a6
@ -3,6 +3,10 @@ from torch.distributions.multivariate_normal import _batch_mahalanobis
|
|||||||
|
|
||||||
|
|
||||||
def mahalanobis_alt(u, v, std):
|
def mahalanobis_alt(u, v, std):
|
||||||
|
"""
|
||||||
|
Stolen from Fabian's Code (Public Version)
|
||||||
|
|
||||||
|
"""
|
||||||
delta = u - v
|
delta = u - v
|
||||||
return th.triangular_solve(delta, std, upper=False)[0].pow(2).sum([-2, -1])
|
return th.triangular_solve(delta, std, upper=False)[0].pow(2).sum([-2, -1])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user