071fb5fb20683946a33f40d28af466f8e9ffc1bd,liegroups/torch/so2.py,SO2,left_jacobian,#Any#Any#,41

Before Change


                len(large_angle_inds), cls.dim, cls.dim)
            jac_large_angle[:, 0, 0] = A
            jac_large_angle[:, 0, 1] = -B
            jac_large_angle[:, 1, 0] = B
            jac_large_angle[:, 1, 1] = A
            jac[large_angle_inds] = jac_large_angle

After Change


            s = angle.sin()
            c = angle.cos()

            A = (s / angle).unsqueeze_(dim=1).unsqueeze_(
                dim=2).expand_as(jac[large_angle_inds]) * \
                torch.eye(cls.dim).unsqueeze_(dim=0).expand_as(
                jac[large_angle_inds])
            B = ((1. - c) / angle).unsqueeze_(dim=1).unsqueeze_(
                dim=2).expand_as(jac[large_angle_inds]) * \
                cls.wedge(phi.__class__([1.]))

            jac[large_angle_inds] = A + B

        return jac.squeeze_()

    @classmethod
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: utiasSTARS/liegroups
Commit Name: 071fb5fb20683946a33f40d28af466f8e9ffc1bd
Time: 2017-10-17
Author: clement.leopold@gmail.com
File Name: liegroups/torch/so2.py
Class Name: SO2
Method Name: left_jacobian


Project Name: OpenNMT/OpenNMT-py
Commit Name: ba164c0dbb3d8171004380956a88431f4e8248ba
Time: 2017-08-01
Author: bpeters@coli.uni-saarland.de
File Name: onmt/Models.py
Class Name: Embeddings
Method Name: make_positional_encodings


Project Name: OpenNMT/OpenNMT-py
Commit Name: 3bc7e38ed98f3b7a13fcee2726ec38b27e5c4e1b
Time: 2017-06-23
Author: srush@sum1gpu02.rc.fas.harvard.edu
File Name: onmt/Models.py
Class Name: Encoder
Method Name: _embed