90e643c7a3727afef2caf932281e6ae91d62aac5,examples/cluster_gcn_ppi.py,Net,forward,#Net#Any#Any#,36
Before Change
self.lin3 = torch.nn.Linear(4 * 256, train_dataset.num_classes)
def forward(self, x, edge_index):
x = F.elu(self.conv1(x, edge_index) + self.lin1(x))
x = F.elu(self.conv2(x, edge_index) + self.lin2(x))
x = self.conv3(x, edge_index) + self.lin3(x)
return x
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
After Change
self.convs.append(SAGEConv(hidden_channels, out_channels))
def forward(self, x, edge_index):
for conv, batch_norm in zip(self.convs[:-1], self.batch_norms):
x = conv(x, edge_index)
x = batch_norm(x)
x = F.relu(x)
x = F.dropout(x, p=0.2, training=self.training)
return self.convs[-1](x, edge_index)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: rusty1s/pytorch_geometric
Commit Name: 90e643c7a3727afef2caf932281e6ae91d62aac5
Time: 2020-06-07
Author: matthias.fey@tu-dortmund.de
File Name: examples/cluster_gcn_ppi.py
Class Name: Net
Method Name: forward
Project Name: rusty1s/pytorch_geometric
Commit Name: f4622e59a087d04bc0628b52c33f0cc9f296223e
Time: 2020-12-24
Author: matthias.fey@tu-dortmund.de
File Name: examples/film.py
Class Name: Net
Method Name: forward
Project Name: osmr/imgclsmob
Commit Name: 0cee8240c752ce8af8caad4b3c1c9533c57e16cd
Time: 2019-04-07
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/sknet.py
Class Name: SEInitBlock
Method Name: forward