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])