99e8a69bad6b3bd641a27d1cbfddc4e71e6fb821,se3cnn/point_utils.py,,neighbor_difference_matrix,#Any#Any#,15

Before Change




def neighbor_difference_matrix(neighbors, geometry):
    if len(neighbors.shape) == 2:
        N, K = neighbors.shape[-2:]
        ri = geometry[..., neighbors, :]  // [N, K, 3]
        rj = geometry[..., torch.arange(N), :].unsqueeze(-2)  // [N, 1, 3]

After Change


    elif neighbors.dim() == 3:
        B, N, _K = neighbors.size()
        ri = geometry[torch.arange(B).view(-1, 1, 1), neighbors, :]  // [B, N, K, 3]
        rj = geometry[torch.arange(B).view(-1, 1), torch.arange(N).view(1, -1), :].unsqueeze(-2)  // [B, N, 1, 3]
    rij = ri - rj  // [N, K, 3] or [B, N, K, 3]
    return rij
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: mariogeiger/se3cnn
Commit Name: 99e8a69bad6b3bd641a27d1cbfddc4e71e6fb821
Time: 2019-07-05
Author: geiger.mario@gmail.com
File Name: se3cnn/point_utils.py
Class Name:
Method Name: neighbor_difference_matrix


Project Name: maciejkula/spotlight
Commit Name: bc51dbc0c56f68ed30857755026633f78eef1ae8
Time: 2017-08-20
Author: maciej.kula@gmail.com
File Name: spotlight/layers.py
Class Name: BloomEmbedding
Method Name: forward


Project Name: dmlc/dgl
Commit Name: b6c4deb4e9442095b1263241452f8550b4946e2a
Time: 2020-06-24
Author: 33802893+Axeln78@users.noreply.github.com
File Name: tests/pytorch/test_nn.py
Class Name:
Method Name: test_dense_cheb_conv