cb3c3798eabae57bab06227d0e77687c14bf099b,geomstats/stiefel.py,StiefelCanonicalMetric,inner_product,#StiefelCanonicalMetric#Any#Any#Any#,84
Before Change
n_tangent_vecs_a, _, _ = tangent_vec_a.shape
tangent_vec_b = gs.to_ndarray(tangent_vec_a, to_ndim=3)
n_tangent_vecs_b, _, _ = tangent_vec_b.shape
assert n_tangent_vecs_a == n_tangent_vecs_b
After Change
tangent_vec_a = gs.to_ndarray(tangent_vec_a, to_ndim=3)
tangent_vec_b = gs.to_ndarray(tangent_vec_b, to_ndim=3)
base_point = gs.to_ndarray(base_point, to_ndim=3)
base_point_transpose = gs.transpose(base_point, axes=(0, 2, 1))
aux = gs.matmul(
gs.transpose(tangent_vec_a, axes=(0, 2, 1)),
gs.eye(self.n) - 0.5 * gs.matmul(base_point, base_point_transpose))
inner_prod = gs.trace(gs.matmul(aux, tangent_vec_b))
return inner_prod
def exp(self, tangent_vec, base_point):
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: geomstats/geomstats
Commit Name: cb3c3798eabae57bab06227d0e77687c14bf099b
Time: 2018-11-21
Author: ninamio78@gmail.com
File Name: geomstats/stiefel.py
Class Name: StiefelCanonicalMetric
Method Name: inner_product
Project Name: cornellius-gp/gpytorch
Commit Name: e8a945606e0b3dafe71ce2f1bf1b52ab3b05428c
Time: 2021-02-10
Author: wjm363@nyu.edu
File Name: gpytorch/lazy/kronecker_product_added_diag_lazy_tensor.py
Class Name: KroneckerProductAddedDiagLazyTensor
Method Name: _solve
Project Name: GPflow/GPflow
Commit Name: d1ac7b831ad36cd0e4bdd7980819f83208345148
Time: 2018-02-07
Author: alex.ialongo@gmail.com
File Name: gpflow/expectations.py
Class Name:
Method Name: _expectation
Project Name: GPflow/GPflow
Commit Name: bd1e9c04b48dd5ccca9619d5eaa2595a358bdb08
Time: 2020-01-31
Author: st--@users.noreply.github.com
File Name: gpflow/kernels/misc.py
Class Name: ArcCosine
Method Name: K_diag