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

Before Change


        row = torch.arange(batch.size(0), device=batch.device)
        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)

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)
        return self.lin2(out)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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: HyperGAN/HyperGAN
Commit Name: 0cac8a127bff58650802bd507f90c55b653587a6
Time: 2016-12-03
Author: mikkel@255bits.com
File Name: lib/gan.py
Class Name:
Method Name: generator


Project Name: OpenNMT/OpenNMT-py
Commit Name: 3bc7e38ed98f3b7a13fcee2726ec38b27e5c4e1b
Time: 2017-06-23
Author: srush@sum1gpu02.rc.fas.harvard.edu
File Name: onmt/Models.py
Class Name: Encoder
Method Name: _embed