d8dd8caeec861648813ae7b1112b3faf7f85a326,mnist/main.py,Net,forward,#Net#,18
Before Change
self.fc2 = nn.Linear(50, 10)
def forward(self, x):
x = F.relu(F.max_pool2d(self.conv1(x), 2))
x = F.relu(F.max_pool2d(self.conv2_drop(self.conv2(x)), 2))
x = x.view(-1, 320)
x = F.relu(self.fc1(x))
x = F.dropout(x, training=self.training)
x = self.fc2(x)
return F.log_softmax(x, dim=1)
def train(args, model, device, train_loader, optimizer, epoch):
After Change
self.fc2 = nn.Linear(500, 10)
def forward(self, x):
x = F.relu(self.conv1(x))
x = F.max_pool2d(x, 2, 2)
x = F.relu(self.conv2(x))
x = F.max_pool2d(x, 2, 2)
x = x.view(-1, 4*4*50)
x = F.relu(self.fc1(x))
x = self.fc2(x)
return F.log_softmax(x, dim=1)
def train(args, model, device, train_loader, optimizer, epoch):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: pytorch/examples
Commit Name: d8dd8caeec861648813ae7b1112b3faf7f85a326
Time: 2018-12-12
Author: 33121121+surgan12@users.noreply.github.com
File Name: mnist/main.py
Class Name: Net
Method Name: forward
Project Name: rusty1s/pytorch_geometric
Commit Name: a7fd67bd27f83cf7c9438626bb642e1928dbe814
Time: 2020-09-23
Author: matthias.fey@tu-dortmund.de
File Name: examples/ppi.py
Class Name: Net
Method Name: forward
Project Name: pytorch/examples
Commit Name: 0634306968ed7f28e2b11b69d3b2df348b8ec53c
Time: 2019-11-11
Author: fedor.shabashev@gmail.com
File Name: mnist/main.py
Class Name: Net
Method Name: forward