fdefea94af715b82cf1c885e53da75dfa26f5b58,se3cnn/SO3.py,,spherical_harmonics_xyz,#Any#Any#,244

Before Change



        // fix values when xyz = 0
        if (xyz.view(-1, 3).norm(2, -1) == 0).nonzero().numel() > 0:  // this `if` is not needed with version 1.0 of pytorch
            val = torch.cat([spherical_harmonics(0, xyz.flatten()[0], 321) if l == 0 else xyz.new_zeros(2 * l + 1) for l in order])  // [m]
            out[:, xyz.norm(2, -1) == 0] = val.view(-1, 1)
        return out

After Change


        out = spherical_harmonics(order, alpha, beta)  // [m, ...]

        // fix values when xyz = 0
        val = torch.cat([xyz.new_tensor([1 / math.sqrt(4 * math.pi)]) if l == 0 else xyz.new_zeros(2 * l + 1) for l in order])  // [m]
        out[:, xyz.norm(2, -1) == 0] = val.view(-1, 1)
        return out
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: mariogeiger/se3cnn
Commit Name: fdefea94af715b82cf1c885e53da75dfa26f5b58
Time: 2019-08-14
Author: geiger.mario@gmail.com
File Name: se3cnn/SO3.py
Class Name:
Method Name: spherical_harmonics_xyz


Project Name: mapillary/inplace_abn
Commit Name: e6bbf54046cf4567e88cb130300b6b78ec88cb27
Time: 2018-11-28
Author: samuel@mapillary.com
File Name: test_imagenet.py
Class Name:
Method Name: validate


Project Name: pytorch/examples
Commit Name: 645c7c386e62d2fb1d50f4621c1a52645a13869f
Time: 2018-04-24
Author: soumith@gmail.com
File Name: fast_neural_style/neural_style/utils.py
Class Name:
Method Name: normalize_batch