8b8fbd3aa664d69c8372f39bb36b6d7f83c52b73,geomstats/stiefel.py,StiefelEuclideanMetric,retraction,#StiefelEuclideanMetric#Any#Any#,236

Before Change


        // Q, R = gs.linalg.qr(base_point + tangent_vec)
        // TODO: remove cycle, when qr will be vectorized
        matrix_q = gs.zeros_like(base_point)
        matrix_r = gs.zeros((
            base_point.shape[0], base_point.shape[2], base_point.shape[2]))
        for i, k in enumerate(base_point + tangent_vec):
            matrix_q[i], matrix_r[i] = gs.linalg.qr(k)

After Change


        if n_base_points == 1:
            base_point = gs.tile(base_point, (n_tangent_vecs, 1, 1))
        if n_tangent_vecs == 1:
            tangent_vec = gs.tile(tangent_vec, (n_base_points, 1, 1))
        n_retractions = gs.maximum(n_base_points, n_tangent_vecs)
        // Q, R = gs.linalg.qr(base_point + tangent_vec)
        // TODO: remove cycle, when qr will be vectorized
        matrix_q = gs.zeros_like(base_point)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: geomstats/geomstats
Commit Name: 8b8fbd3aa664d69c8372f39bb36b6d7f83c52b73
Time: 2018-11-21
Author: ninamio78@gmail.com
File Name: geomstats/stiefel.py
Class Name: StiefelEuclideanMetric
Method Name: retraction


Project Name: tensorflow/magenta
Commit Name: 5c6408cec7451d5571ecd38eedb108d6c771678b
Time: 2016-11-02
Author: iansimon@users.noreply.github.com
File Name: magenta/models/melody_rnn/melody_rnn_model.py
Class Name: MelodyRnnModel
Method Name: _generate_branches


Project Name: geomstats/geomstats
Commit Name: 8b8fbd3aa664d69c8372f39bb36b6d7f83c52b73
Time: 2018-11-21
Author: ninamio78@gmail.com
File Name: geomstats/stiefel.py
Class Name: StiefelEuclideanMetric
Method Name: log