15f8d1934dc72debc6928c4461a1f8f65e551ce1,torch_geometric/nn/models/attentive_fp.py,AttentiveFP,forward,#AttentiveFP#Any#Any#Any#Any#,102

Before Change


        edge_index = torch.stack([row, batch], dim=0)

        out = global_add_pool(xs[-1], batch)
        for conv, gru, x in zip(self.mol_convs, self.mol_grus, xs):
            h = F.elu_(conv((x, out), edge_index))
            out = gru(h, out)

        // Predictor:
        out = F.dropout(out, p=self.dropout, training=self.training)
        return self.lin2(out)

After Change


        x = F.leaky_relu_(self.lin1(x))

        h = F.elu_(self.atom_convs[0](x, edge_index, edge_attr))
        h = F.dropout(h, p=self.dropout, training=self.training)
        x = self.atom_grus[0](h, x).relu_()

        for conv, gru in zip(self.atom_convs[1:], self.atom_grus[1:]):
            h = F.elu_(conv(x, edge_index))
            h = F.dropout(h, p=self.dropout, training=self.training)
            x = gru(h, x).relu_()

        // Molecule Embedding:
        row = torch.arange(batch.size(0), device=batch.device)
        edge_index = torch.stack([row, batch], dim=0)

        out = global_add_pool(x, batch).relu_()
        for t in range(self.num_timesteps):
            h = F.elu_(self.mol_conv((x, out), edge_index))
            h = F.dropout(h, p=self.dropout, training=self.training)
            out = self.mol_gru(h, out).relu_()

        // Predictor:
        out = F.dropout(out, p=self.dropout, training=self.training)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: rusty1s/pytorch_geometric
Commit Name: 15f8d1934dc72debc6928c4461a1f8f65e551ce1
Time: 2021-03-28
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/models/attentive_fp.py
Class Name: AttentiveFP
Method Name: forward


Project Name: dmlc/dgl
Commit Name: 68fb5f7e51a8a735f372cb0893dbeed0bc0fb623
Time: 2018-07-03
Author: ly979@nyu.edu
File Name: examples/pytorch/gat.py
Class Name: GAT
Method Name: forward


Project Name: facebookresearch/ParlAI
Commit Name: 12eb6139549f79314abe3198d42af116c5b9e0b9
Time: 2018-02-27
Author: kshuster@fb.com
File Name: parlai/agents/mlb/mlb_modules.py
Class Name: MlbAtt
Method Name: forward_glimpses