6b8b2026f4501c3d6b62031c79ee38dd64955e1f,torch_geometric/nn/conv/message_passing.py,MessagePassing,propagate,#MessagePassing#Any#Any#,43

Before Change



        message_args = []
        for arg in self.message_args:
            if arg[-2:] == "_i":
                tmp = kwargs[arg[:-2]]
                if tmp is not None:
                    if size[i] is None:
                        size[i] = tmp.size(0)
                    tmp = torch.index_select(tmp, 0, edge_index[i])
                message_args.append(tmp)
            elif arg[-2:] == "_j":
                tmp = kwargs[arg[:-2]]
                if tmp is not None:

After Change


                    idx = ij[arg[-2:]]
                    if size[idx] is None:
                        size[idx] = tmp[idx].size(0)
                    tmp = torch.index_select(tmp[idx], 0, edge_index[idx])
                message_args.append(tmp)
            else:
                message_args.append(kwargs[arg])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: rusty1s/pytorch_geometric
Commit Name: 6b8b2026f4501c3d6b62031c79ee38dd64955e1f
Time: 2019-04-02
Author: kuynzereb@gmail.com
File Name: torch_geometric/nn/conv/message_passing.py
Class Name: MessagePassing
Method Name: propagate


Project Name: cornellius-gp/gpytorch
Commit Name: 4c6458b841bb49610b5cf6b9fbab94df5cad85ee
Time: 2019-01-23
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/interpolated_lazy_tensor.py
Class Name: InterpolatedLazyTensor
Method Name: _quad_form_derivative


Project Name: pytorch/fairseq
Commit Name: d502958b4d3356c19e217bee834167b99a945423
Time: 2020-04-21
Author: myleott@fb.com
File Name: fairseq/models/lstm.py
Class Name: LSTMEncoder
Method Name: reorder_encoder_out