6ad34e5887f847aeb9f681e8f290d5877b76e52b,torch_geometric/nn/models/schnet.py,GaussianSmearing,forward,#GaussianSmearing#Any#,105

Before Change


        self.register_buffer("offsets", offsets)

    def forward(self, distances):
        coeff = -0.5 / torch.pow(self.widths, 2)
        gauss = torch.exp(coeff * torch.pow(distances - self.offsets, 2))
        return gauss


class ShiftedSoftplus(nn.Module):
    def __init__(self, beta=1, threshhold=20, shift=None):

After Change


        self.register_buffer("offset", offset)

    def forward(self, dist):
        dist = dist.view(-1, 1) - self.offset.view(1, -1)
        return torch.exp(self.coeff * torch.pow(dist, 2))


class ShiftedSoftplus(torch.nn.Module):
    def __init__(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: rusty1s/pytorch_geometric
Commit Name: 6ad34e5887f847aeb9f681e8f290d5877b76e52b
Time: 2020-05-13
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/models/schnet.py
Class Name: GaussianSmearing
Method Name: forward


Project Name: google/nucleus
Commit Name: 397dace4af2db3adaec1746ab4dce36ac715cdfe
Time: 2018-11-02
Author: no-reply@google.com
File Name: nucleus/util/genomics_math.py
Class Name:
Method Name: log10sumexp


Project Name: rusty1s/pytorch_geometric
Commit Name: d08f673481a2cfaa0ce702e80cc22cdd25e600e5
Time: 2020-05-31
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/models/schnet.py
Class Name: GaussianSmearing
Method Name: forward


Project Name: google/deepvariant
Commit Name: bd9bdcb334be151fe0195d8685d575355df5a551
Time: 2018-11-02
Author: no-reply@google.com
File Name: third_party/nucleus/util/genomics_math.py
Class Name:
Method Name: log10sumexp