3c082fc0821ff9f9b1284a486a5cf60f9aec238e,examples/loss_and_gradient_se3.py,,grad,#Any#Any#Any#Any#,39

Before Change


                            * gs.outer(quat_vec, quat_vec) / quat_vec_norm ** 2
                            + 2 * quat_arctan2 / quat_vec_norm * gs.eye(3))

        upper_left_block[0, :, :1] = differential_scalar.transpose()
        upper_left_block[0, :, 1:] = differential_vec
        lower_right_block[0, :, :] = gs.eye(3)

        differential[0, :3, :4] = upper_left_block

After Change


                            * gs.einsum("ni,nj->nij",quat_vec, quat_vec) / quat_vec_norm * quat_vec_norm
                            + 2 * quat_arctan2 / quat_vec_norm * gs.eye(3))

        differential_scalar_t = gs.transpose(differential_scalar,axes=(1,0))

        upper_left_block = gs.hstack((differential_scalar_t, differential_vec[0]))
        upper_right_block = gs.zeros((3, 3))
        lower_right_block = gs.eye(3)
        lower_left_block = gs.zeros((3, 4))

        top = gs.hstack((upper_left_block, upper_right_block))
        bottom = gs.hstack((lower_left_block, lower_right_block))

        differential = gs.vstack((top, bottom))
        differential = gs.expand_dims(differential, axis=0)

        grad = gs.einsum("ni,nij->ni", grad, differential)

    grad = gs.squeeze(grad, axis=0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: geomstats/geomstats
Commit Name: 3c082fc0821ff9f9b1284a486a5cf60f9aec238e
Time: 2018-11-07
Author: null
File Name: examples/loss_and_gradient_se3.py
Class Name:
Method Name: grad


Project Name: geomstats/geomstats
Commit Name: 5f64204ab895dee4c4a706879f89d714237a5057
Time: 2018-09-26
Author: claire.donnat@gmail.com
File Name: geomstats/minkowski_space.py
Class Name: MinkowskiMetric
Method Name: inner_product_matrix


Project Name: biolab/orange3
Commit Name: c79669f77f9564fd035e7926b4423342db37b2c9
Time: 2017-05-26
Author: jerneju@gmail.com
File Name: Orange/widgets/data/owmergedata.py
Class Name: OWMergeData
Method Name: _join_array_by_indices


Project Name: logpai/loglizer
Commit Name: 7c960272c5ab4d25a022538f5849addec3e6bfee
Time: 2019-02-25
Author: zhujm.home@gmail.com
File Name: loglizer/preprocessing.py
Class Name: FeatureExtractor
Method Name: transform